What about, if you could generate UPC-A (UPC12) in Adobe Illustrator by replacing all 12-digit text in your open document with a working barcode? This free script creates barcodes that will follow the placement, size and rotation of your barcode text. Isn’t it smart and easy?
Finally, I found time to write this blog post, where I’ll describe how the UPC-A barcode script works and cover the known issues. The UPC-A Barcode script is available here. You are also welcome to have a look at my other scripts. This script works the same way as my EAN13 Barcode Script, with the only difference being that it creates a UPC-A Barcode.
Installation of UPC-A Barcode Script in Adobe Illustrator:
- Download the ZIP folder
- Extract the JSX file from ZIP folder.
- Place the UPC12.jsx file in:
- Win (32 bit): C:\Program Files (x86)\Adobe\Adobe Illustrator [vers.]\Presets\en_GB\Scripts\
- Win (64 bit): C:\Program Files\Adobe\Adobe Illustrator [vers.] (64 Bit)\Presets\en_GB\Scripts\
- Mac OS: /Applications/Adobe Illustrator [vers.]/Presets.localized/en_GB/Scripts
- Restart Illustrator
- The script should be visible now under File > Scripts > UPC12
NOTE: The OCRB Std font also needs to be installed on your computer. This font is available at Adobe TypeKit.
How Can You Generate UPC-A Barcode in Adobe Illustrator with the UPC-A Barcode Script?
Well, it’s straightforward. In the open Adobe Illustrator document, write the 12 digits of your barcode and run the UPC-A Barcode script. The script will find the strings that contain 12-digits corresponding to a valid UPC-A barcode and replace them with barcodes.
The Size of the UPC-A Barcode
The size of your barcode will depend on the size of your text. For example, the default Myriad Pro 12 points text will generate a UPC-A in Adobe Illustrator as a barcode group of around 28 mm. If you increase the size of the text, the generated barcode will also scale proportionally.
Rotation of the UPC-A Barcode
In case if you rotate the barcode text, then the generated barcode will also be rotated. I found this function very convenient. For example, if you create a box or other packaging, the barcode should be located at a certain angle according to your design.
Checksum Digit in your UPC-A Barcode
A unique formula calculates the checksum digit that all barcodes have. UPC-A also follows this rule. Therefore if your 12 digits create a wrong checksum digit, an alert will appear.
As you can see in the picture below, the alert suggests a checksum digit, but it is essential to ensure that the barcode you received is correct, rather than simply change the last digit to 7.
UPC-A and Layers
Further, created barcodes keep their position on the respective layers, as illustrated in the GIF below.
However, you must remember that the script will ignore this text string if a layer is locked or invisible. When I programmed the script to do so, I had it in mind that if a layer is locked or invisible, it’s because you don’t want to allow changes on this layer.
Using UPC-A barcode script in Adobe Illustrator with Data sets and the Batch action
I experienced that several users have asked if it is possible to use UPC12 barcode script with datasets and batch action. Unfortunately, this is not possible in the current UPC12 barcode script version, but I plan to improve the script in this direction. In the meantime, I can suggest the procedure described below. First, run the Batch action, which will save all Data sets as separate documents in a folder.
Afterwards, run the UPC12 barcode script as a new Batch action using the newly created folder.
This procedure will save all sets as separated files with the barcodes created.
In the end, I want to say that I hope my script will help you to make UPC12 barcode in Adobe Illustrator and be beneficial to designers working with packaging design. I’m always open to hearing your opinion and ideas on how I can improve this tool. So please do not be shy to contact me directly or leave a comment.