Label Printing with Bartender

Jessie
Jessie
  • Updated

You can design and print labels for items in your tenant through the BarTender integration. 

What is BarTender?

BarTender is a third-party label printing software application that supports a wide range of compliant, regulated industries. With BarTender, you can design labels and print from any computer connected to Benchling without manually uploading labels or installing software on each computer you’re printing from. To purchase BarTender, visit seagullscientific.com.

Using a Benchling / BarTender integration, you can set up, design, and manage labels while using a wide range of printers to meet the label printing needs within your lab.

How BarTender works with Benchling

BarTender runs on your local network. All communication with BarTender happens between your browser and the local BarTender server. This means your information and your printers aren’t accessible to Benchling’s servers.

Screenshot 2023-10-12 at 10.36.13 AM.png

The BarTender Enterprise Edition version 2021 or newer must be used to work with Benchling. The BarTender server must have access to printers via your network, USB, or Windows printer sharing.

Install the BarTender Server

You will need to install BarTender on a Windows machine in a traditional on-premise environment connected to your local network. The BarTender server(s) must be able to access your printers and must be accessible to any computer that wants to print labels. BarTender then needs to access the printers you will print to either on the network, via USB, or via Windows printer sharing. 

Server recommendations

Benchling’s integration with BarTender takes advantage of BarTender’s centralized server capabilities. The BarTender server(s) must be able to access your printers and must be accessible to any computer that will print labels.

Many customers choose to install BarTender in the cloud and connect it to their network via a Virtual Private Cloud (VPC). This route works with Benchling. Note that using this method you will probably have to connect each printer to the BarTender server using Windows printer sharing. You can also install BarTender on in the cloud and connect via a VPC.

Any computer that will be printing labels needs to connect to the BarTender server via Windows printer sharing or they must have the correct drivers installed locally. Drivers only need to be installed on the BarTender server. Printers that connect via USB and can not physically be connected to the BarTender server will need to connect via Windows printer sharing. 

We recommend one BarTender server in most cases, but the integration works if you have multiple servers. Printers and label templates are local to each server, so BarTender servers are a way to group printers and labels by building or region. If you have sub-networks for each building, localizing BarTender servers in the building sub-networks is a way to ensure users don’t print labels to printers in different buildings.

Install BarTender on your Local Network

Benchling integrates with BarTender Print Portal which runs on Windows IIS. If Windows IIS is not already installed, the BarTender installer will include it in the installation process. If you have questions about BarTender installation that aren’t covered in this article, please reach out to BarTender support.

Note: If your Windows device is in S mode, you must switch out of S mode to install BarTender.

After initiating installation:

  1. On the opening screen of the BarTender Setup Wizard, check Specify advanced installation options.
  2. On the Advanced Installation Options screen, select BarTender with Print Portal, and leave Add Microsoft SQL Server Express checked.
  3. Ensure the location in Install to is correct.
  4. Follow the prompts to complete installation.

After installation, Windows Defender Firewall might raise an alarm. You must allow access to private networks but BarTender doesn’t need access to public networks.

Installing printer drivers

Any computer that will be printing labels needs the correct drivers installed based on which printer(s) are used in the lab, or they must be made available to the BarTender server via Windows printer sharing. Printers that connect via USB and can’t physically be connected to the BarTender server will need to connect via Windows printer sharing.

To download the BarTender printer drivers, visit seagullscientific.com/support/downloads/drivers. You can also visit this BarTender help article for Installing Drivers by Seagull

Configure BarTender to Benchling

To ensure communication between Benchling and the BarTender server is not blocked by users’ web browsers, you must configure Cross-Origin Resource Sharing (CORS) settings. The BarTender server(s) must also be assigned URLs with SSL certificates.

SSL certificate requirements

Before installing and configuring the IIS CORS module, ensure your BarTender server uses a valid Secure Sockets Layer (SSL) certificate. The BarTender server has to be accessible via https, and https servers require a certificate. This security protocol authenticates communication between the server and the browser and allows it to be encrypted. Benchling is secured with SSL, so if your server doesn't use a URL with a valid SSL certificate, your browser will block the label printing requests.

For the SSL certificate to be valid, it must be accepted by your browser. The certificate must also match the server’s hostname.

Certificates issued by internal certificate authority’s (CA) are acceptable, however in most cases, a certificate is issued by a commercial CA that's automatically accepted by most browsers (i.e. DigiCert, Entrust, or Verisign). This typically means you own the domain assigned to the server, but the hostname doesn't need to be publicly accessible. This will most likely depend on your hosting or network security setup. Reach out to your IT team for further questions on this.

Note: We don’t currently support BarTender Cloud. Please reach out to support@benchling.com if you are interested in Benchling building out this feature.

Install and configure the IIS CORS module

To install the Microsoft IIS CORS module:

  1. Go to https://www.iis.net/downloads/microsoft/iis-cors-module.
  2. At the bottom of the install page under Download IIS CORS 1.0, click x64 installer (AMD) or x86 installer (Intel). Don’t click the install extension at the top of the page.
  3. Complete the installation process.

To configure the IIS CORS module:

  1. Open the Windows Internet Information Services (IIS) Manager Windows
  • Under the Connections, go to the BarTender server, 

 

Screenshot 2023-11-16 at 2.36.33 PM.png

  • Set system.webServer/cors enabled to True

Screenshot 2023-11-16 at 2.37.47 PM.png

  1. Right-click (Collection)Element and select Edit Items.
    • Click Add on the right hand side under Actions and Collection

Screenshot 2023-11-16 at 2.39.48 PM.png

  1. In the Properties section
    • Open the allowHeaders property and set allowAllRequestedHeaders to True.
    • Set origin to your full Benchling tenant URL:  https://<tenant>.benchling.com
    • Click the allowMethods row, then under Collection on the right-side, click Add in Actions menu 

  1. Set two allowMethods with OPTIONS and POST values.
    • Enter OPTIONS as the value of the method property, then click Add.
    • Enter POST as the value of the method property, then click Add.
  2. Click X in the top-right corner to close this window.
  3. Click Apply.

The gif below shows the steps 1-6 detailed above.

With a self-signed SSL you may experience an inability to print from your browsers. This is expected behavior as, technically, the site isn’t secure since the certificate is not generated by a trusted third party.

If you are experiencing a network error on different browsers, you may need to take an intermediate step once per device: 

  1. Navigate to the bartender page (namely https://localhost/bartender/), 
  2. Allow access when the browser shows a warning, 
  3. Print. Bartender server  must have a self-signed SSL. The “Not Secure” warning may persist but should not impact the ability to print.

The use of a self-signed SSL certificate is a great intermediate step when first setting up BarTender and getting it working quickly, but it is not meant to be a long-term solution because it triggers a warning message on each site that accesses the server.

Test your Bartender configuration

BarTender should be running at  http://localhost/Bartender/ by default. An easy way to test this configuration is to go to your browser and type in https://localhost/bartender which should bring up a page that looks like this: 

There are two things you need to do to make it available to other people on the network:

The specifics of how to do both of these depend on how your IT infrastructure is set up. If you're not sure how to do both of these please consult your IT team and reach out to Benchling support if more help is needed.

Adding the BarTender Server to Benchling

To set your print method to BarTender, follow the steps outlined in in this article

To make your BarTender servers available on the network to anyone needing to print labels, you must point Benchling to the servers by adding their URLs on the Label Printing settings page.

To add the servers in Benchling:

  1. In Feature Settings under the Label Printing section, click Label Printing.
  2. Click + next to BarTender server
  3. Enter the server URL and display name.
    1. Adding a Display name is optional but it will help users find the right server if there are multiple BarTender servers. 
  4. Click Save.Screen Shot 2022-03-23 at 3.56.14 PM.png

Printer statuses

Navigating to the Label Printing settings page triggers Benchling to check the configured servers. The status it displays reflects the connection between your browser and the BarTender’s server. When a check is successful, Benchling displays the number of printers and label templates managed by each server.

If the server status displays an error, ensure your browser can access the BarTender server by reviewing the configuration section above. 

Creating and managing BarTender label templates

Use BarTender’s visual design software to create labels, add label elements and Benchling properties, and configure data entry forms, then print directly from your connected device.

Adding elements and Benchling properties to a label template

To print a label from Benchling that contains properties of the Benchling object, like a barcode, entity name, ID, date created, etc., you can use BarTender’s visual template designer. Add general template elements by dragging and dropping them into place on your template, then rearrange and resize as needed. For each element, you can replace the default value with an example value to help visualize element spacing.

For the table of Benchling-recognized keywords to add to your template, visit Label printing basics.

Configure the label’s data entry form

  1. Click Form 1 in the bottom-left corner of the template creation screen.
  2. In the left-side panel of Data Sources, click and drag the element(s) you want to populate with Benchling data into the Data Entry Form area.
  3. In the modal that displays, select Text Input Box, then click Create. 
    • You can also click from Create at the top of the software, then Data Entry Control and Text Input Box

Text Input Box (1).gif

Add the Benchling-recognized keywords

  1. Double-click on the new Text Input Box that was created to open another modal.
  2. Set the Object name as the Benchling keyword.
    • For example, benchling.entity.registry_id
  3. Click Close.

Benchling Keywords.gif

Repeat steps 1-5 for each element to be populated with Benchling data.

Using the same Benchling keyword multiple times in one template

You may need to display the same Benchling keyword multiple times in the same template. For example, you might need a container barcode as both a QR code and as text on the same label.

When adding the same Benchling keyword to a label you’ve already added it to, an error will display when entering the Object name. To nullify the error, change the Data Sources settings for the additional label element.

To change the Data Sources settings:

  1. On the right side of the Data Sources panel, click the third button Change Data Source Type.
  2. Select Object Value, then click Next.
  3. On the next screen, select the object that used the keyword first.
  4. Click Finish, then click Close.

Converting ZPL templates

If you already have a library of label templates in Benchling they are stored as .zpl files. These files cannot be imported into BarTender. To use these templates they must be recreated manually in BarTender.

For any further questions, please reach out to our support team at support@benchling.com.

Was this article helpful?

Have more questions? Submit a request