Are you looking for a solution to add barcodes to your PDF documents dynamically? Would you like to know how to automate that solution?
Enfocus Switch in combination with Enfocus PitStop Server can automatically add barcodes to your PDF documents. Enfocus Switch reads dynamic data and PitStop Server adds the dynamic data to your PDF document.
What is needed for this example?
- A job with a name that contains the barcode number and barcode type
- An Enfocus Switch workflow
- A barcode font
- A variable set with an Enfocus Switch variable
- An Action List that adds text to your PDF file using the barcode font
And the good news is, it’s simple to set up and add barcodes to your PDF documents dynamically. Just follow along below!
Job name
Let’s take a look at the job’s name: 0123456789012815051231_customerB_color4_Code128.pdf.
The first part of the job’s name is the barcode (up to the “_”) and the last section is the barcode type. Jobs with Code128 in their name need to have a 128 barcode type and jobs with Code39 in their name will need to have a 39 barcode type.
Note: If you have an XML file containing the required information then values can be assigned using XPath locations to trigger and populate barcode creation instead of parsing values from the filename.
Enfocus Switch workflow
Jobs that have code39 in their name will go to the “Code 39” folder and jobs that have code128 in their name will go to the “Code 128” folder.
Here’s how to set it up:
Barcode font
Different companies offer barcode fonts online, here is one example website. There are also free versions of most barcode topologies available online. Google is your friend in this case…
Once you have purchased or downloaded the fonts, install them on your system. You can then use them in an Enfocus PitStop Server Action List. We discuss creating the complete Action List further down the page.
Variable set
Selecting the variable set.
Note: A variable set that utilizes Switch variables must be created within Enfocus Switch. If you create them in PitStop Server, they won’t work in your Switch workflow.
Configuration of the variable set.
Here is where we will use parts of the job’s name in the configuration of the variable set:
0123456789012815051231_customerB_color4_Code128.pdf.
Let’s create the following two variables inside of the variable set: barcode and code type.
For the barcode we take all characters before “_ ” and for the barcode type we take the characters between the last “_” and “.” .
Enfocus Switch makes it easy to select segments of a file name using the “Job.NameProper” variable in the “Define single line text with variables” panel.
Action List
Select the Action List in Enfocus Switch.
Configuration of the Action List.
Note: You create the Action List within Enfocus PitStop Server.
Let’s take a look at the details of the “Add object” Action List.
Make sure to set the “Add” option to “text” and the other options you’ll need are pretty straight forward. We have already explained the “Font” option above and the “Text” option is explained further down in this article.
Notice the blue widget named “barcode” in the Text field of the Add object panel. That is one of the variables that we have created in our variable set.
The diagram below shows how you use it within your Action List.
That’s it! Now you can add barcodes to your PDF documents dynamically!
The time that it takes to configure this is just a small percentage of time compared to the time saved when running future jobs. Once the flow is configured, drop files into the input folder and work on other tasks while your jobs are processing.
Enfocus Switch and PitStop Server offer much more than this functionality, so if you’d like to learn more, please contact us today.
Leave a Reply
You must be logged in to post a comment.