One of the form field types you can create with Adobe Acrobat is a barcode. There are three types of barcodes that can be generated:
Most people are familiar with the QR Code from the reader that is built in to smart phones which takes you to the website encoded in the barcode when the camera is focused on it. PDF417 is suitable for capturing data from multiple form fields throughout the form. As the number of fields selected to capture the data increases, so too must the physical size of the PDF417 barcode.
The output can be an XML file or a tab delimited text file. For tab delimited text files, if "Include field names" is selected in the value tab of the field, the first row will be field names and the second row will their corresponding values.
Barcode Readers
For testing, there are several free online barcode readers that can be used by simply uploading a file. Try using the Windows Snipping Tool as described in the following article to capture the barcodes above, save them as file, then upload them to one of the free barcode readers like www.onlinebarcodereader.com.
Adobe Reader Throws A Wrench Into The Works
Barcode form fields are not functional with Adobe Reader without paying for expensive rights that enable PDFs for additional functionality in Reader. The Barcode will become a grey rectangle when attempting to interact with any fields that feed the barcode in Reader. For this reason, barcode form fields are not suitable for general distribution to Reader users.
The exception is a QR Code that won’t change, but the field should be flattened first, or a stamp of the image (see article referenced above), or a button field with the QR Code as its icon should be used.
The Reader Barcode Hack
One dimensional (vertical line) barcodes can be created by installing a barcode font on your computer, creating a text PDF text field, and setting the font to the barcode font. There are lots of free barcode fonts available on the internet with a quick web search. I downloaded and installed Free 3 of 9. After you restart Acrobat it will show up in the list of fonts:
Since the barcode is actually a font inside a text field, it will function with free Adobe Reader and work for all users with Reader (as long as those user also have the font installed). You can test the results by saving the file and uploading it to an online barcode reader like the aformentioned website.
The Free 3 of 9 font only converts upper case letters and excludes many non alpha-numeric characters. The field should contain a validation or calculation upper case conversion script. Also, in order for the barcode to be recognized correctly, the characters must be preceded and proceeded by asterisks like *this*.
Example
Suppose you have First Name and Last Name fields, and you want both names to be displayed in a barcode. Enter the following scripts in the field:
//Calculation Script
event.value=(this.getField("First Name").value +" "+ this.getField("Last Name").value).toUpperCase();
//Format Script
event.value="*"+event.value+"*";
The calculation script joins the First Name and Last Name field values with a space and converts any lower case characters to upper case. The format script displays an asterisk on either side of the value.