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.
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.
Note: Benchling does not communicate directly with the Bartender server but through javascript on the client.
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:
- On the opening screen of the BarTender Setup Wizard, check Specify advanced installation options.
- On the Advanced Installation Options screen, select BarTender with Print Portal, and leave Add Microsoft SQL Server Express checked.
- Ensure the location in Install to is correct.
- 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:
- Go to https://www.iis.net/downloads/microsoft/iis-cors-module.
- 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.
- Complete the installation process.
To configure the IIS CORS module:
- Open the Windows Internet Information Services (IIS) Manager Windows
- Under the Connections, go to the BarTender server,
- Click on the Configuration Editor
- Set system.webServer/cors enabled to True
- Right-click (Collection)Element and select Edit Items.
- Click Add on the right hand side under Actions and Collection.
- 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
- 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.
- Click X in the top-right corner to close this window.
- 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:
- Navigate to the bartender page (namely https://localhost/bartender/),
- Allow access when the browser shows a warning,
- 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:
- Assign that computer a URL in your DNS so that it can, for example, be addressed at http://bartender.<tenantname>.com/Bartender
- Generate an SSL certificate so that it can be addressed at http://bartender.<tenantname>.com/Bartender
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:
- Click your user icon in the bottom-left corner.
- Under Feature Settings, select Inventory Settings, then select Label Printing.
- Click + next to BarTender server
- Enter the server URL and display name.
- Adding a Display name is optional but it will help users find the right server if there are multiple BarTender servers.
- Click Save.
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
- Click Form 1 in the bottom-left corner of the template creation screen.
- 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.
- 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
Add the Benchling-recognized keywords
- Double-click on the new Text Input Box that was created to open another modal.
- Set the Object name as the Benchling keyword.
- For example, benchling.entity.registry_id
- Click Close.
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:
- On the right side of the Data Sources panel, click the third button Change Data Source Type.
- Select Object Value, then click Next.
- On the next screen, select the object that used the keyword first.
- 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.