Image File Integration Example Follow

Avatar
Nigel J. Navarro

Overview

In this example, we will create an integration where we use the an image file a trigger file but also use the same image file inside of the label during print time. So long as the image that you wish to print uses the same name in the trigger file, you can dynamically change the image that you wish to print onto the label during print time.

Sample Files

Implementation

Create a folder called Test in your C:\ drive. We will be using this folder to hold your files as well as be the scan folder for your integration. Place all of your sample files into this Test folder.

Create the BarTender Document

You can use the ImageLabel.btw file up above or simply create a BarTender document with the instructions below:

  1. Open BarTender Designer
  2. Create a new BarTender document
  3. Select the image selector option  up above, and under External Picture File select Specify File Name...
  4. Navigate to the Test folder, click on the Picture.png file and click Select
  5. Save your BarTender document and name it ImageLabel.btw

Create the Integration

You can use the ImageFileIntegration.btin file up above or simply create a new integration with the instructions below:

  1. Open Integration Builder
  2. Select File from the available integration options
  3. Under the File Detection options, change the File Pattern to *.png
  4. In this same window, set the Actions After Detection to None. We'll explain why in a bit.
  5. Head down to the Print Document action. Under Document, select the ImageLabel.btw as the desired label to print.
  6. Add an action using the blue plus button next to the Actions tree. Specifically, we are looking to select the Delete File action:
  7. Under the File option, navigate and select the Picture.png image as the file to be deleted. This action accomplishes two things:
    • It allows the picture to be used for the Print Document action, meaning the label has an image to reference during print time, and
    • This ensures that the integration does not go on forever in an infinite loop, which would have happened after setting the Actions After Detection to None.
  8. Save your integration.

Test the Integration

  1. Click on the Test Integration option in the Home menu.
  2. Click on the Start button to the top right hand side of the testing window. Your integration should now start.
  3. Watch the output messages. Notice how BarTender is able to print the document then delete the image.
  4. Feel free to test this again by adding another Picture.png of your choosing (remember that you can use whatever image you like so long as the name and extension is is Picture.png when it goes into the trigger Test folder

Deploy the Integration

  1. From the Integration Builder toolbar, click  Deploy Integration to open the New Deployment dialog.
  2. In the New Deployment dialog, enter a name and description for your deployment.
  3. Ensure that the Integration File setting lists IntegrationFile.btin (or whatever name you saved your integration as).
  4. For Target Servers, add the server(s) you want to deploy the integration file to.
  5. Specify the desired Error Handling settings.
  6. Click OK to close the dialog and deploy the integration file.
  7. Administration Console will open on the Integrations node, displaying your integration.


Was this article helpful?

0 out of 0 found this helpful


Please sign in to leave a comment.