Barcode Image Data Merge in IndesignThis tutorial shows how to import mass created barcodes into Adobe Indesign. We'll be using Data Merge to load barcode images that were created with our batch barcode generator, Softmatic BarcodeFactory. Typical scenarios are barcodes in pricelists, catalogs, mailings etc.
What you needAdobe Indesign CS4, CS5, CS6 or Creative Cloud. You will also need a simple text editor, like Notepad on Windows or TextEdit on the Mac. The screenshots show BarcodeFactory V4.8 and Indesign CC 2015, the current versions at the time of writing. All screenshots are from the Mac versions of Indesign and BarcodeFactory. Any differences to the Windows version are mentioned in the text.
All images below can be enlarged by clicking on them.
Creating serial barcodesTo start, we will use BarcodeFactory to create a series of Code 128 barcodes. Here are the settings used for this tutorial:
Make sure to tick the option "Write full paths to filenames.txt" in the output settings. Indesign will later use this file as source for the data merge.
This creates a bunch of EPS barcodes plus the filenames.txt file:
Indesign uses the first line of a data source as the field name. To indicate that the contents of the data source is not simply text but instead points to an image file, the field name has to begin with the AT sign (@).
Use a text editor to change the first line of filenames.txt from:
Connecting a data source in IndesignIn Indesign we've created a new empty document and added a single rectangle frame (W 60mm x H 50mm) to it. To connect a data source to this document, select Window > Utilities > Data Merge. This will open the Data Merge panel. In the panel open the context menu and click "Select data source":
In the dialog navigate to the folder with the barcode images and select filenames.txt. Indesign connects to the data source and loads the one field, Barcode, into the panel:
Note the little icon next to the word Barcode. This icon indicates that the content of the field Barcode is not plain text but indeed the location of an image file.
To add the field to the frame you simply click the field in the panel. You can also drag drop it into the target frame:
To verify that the code is actually imported, tick the option Preview in the lower left of the panel:
Of course we want all barcodes in our document, not just one. Again from the context menu of the panel, select "Create merged document":
Multiple barcodes per page in IndesignUsually, you'll want multiple barcodes on a page, for example if you want to print out sheets of labels. In "Records per document page" select "Multiple Records". Then, to specify the layout, margins and distances, click the middle tab of the panel and adjust the layout to your requirements. Make sure to tick the "Preview" option:
From this point on you can print out the document, save it to a PDF or do further editing.
This tutorial is loosely based on a video from Adobe, which shows how to add product images to Indesign via Data Merge.