Encode Multiple Form Fields in an Adobe Acrobat Barcode
Question details
Combine values from multiple Acrobat form fields and encode them in a barcode or QR code.

- Product
- Adobe Acrobat Pro
- Device & OS
- not provided
- Scenario
- A form author wants to include the values of txtAmount and txtChargeCode in a barcode field using Acrobat JavaScript.
- Observed behavior
- The current JavaScript combines the field values as plain text, but the user needs the data encoded in a scannable barcode.
Open the form in Adobe Acrobat Pro and use Prepare a Form to check whether Barcode is an actual barcode field or a text field using a barcode font. Confirm the required barcode format and the data structure expected by the scanner.
Use the built-in calculation for an Acrobat barcode field
Use Acrobat's barcode field options to collect and encode values from multiple form fields.
In Acrobat Pro, open the PDF, select Prepare a Form, and double-click the Barcode field to open its properties.
On the Options tab, select a supported symbology, such as QR Code, and configure its encoding options for the receiving system.
On the Value tab, use the built-in field-selection and encoding options to include txtAmount and txtChargeCode. Choose the available data format that the scanner or receiving application expects.
Inspect the generated calculation script in the Value tab before adapting it. Save the PDF, enter sample values in both fields, and scan the resulting barcode to verify the decoded data.

Follow the encoding rules for a barcode font
Use this approach when Barcode is a text field displayed with a barcode font rather than an Acrobat barcode field.
Open and Work With PDFs in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for working with PDFs and Office documents. It can help you move between common file formats, but it does not fix Acrobat's barcode-field encoding or Reader compatibility.

Frequently Asked Questions
How do I tell whether my barcode is an Acrobat barcode field or a font-based text field?
Open Prepare a Form and inspect the field's properties. An Acrobat barcode field has barcode-specific options; a font-based barcode is a text field whose Appearance tab specifies a barcode font.
Can I put both field values into one QR code?
Yes. In an Acrobat barcode field's properties, select QR Code under Options, then use the Value tab to select and encode the source fields. Verify that the decoded format matches what the receiving application expects.
Why doesn't combining the values as text guarantee a scannable barcode?
A valid barcode must follow the rules of its symbology. A barcode font may need an encoder, control characters, or a checksum, while an Acrobat barcode field uses its own calculation and encoding options.
Will the barcode work in Adobe Acrobat Reader?
Do not assume it will behave the same way as in Acrobat Pro. Test the saved form in the Reader version and environment recipients will use, including entering values and scanning the barcode.




