PDF Editing Issues

How to Use a Custom Delimiter in an Acrobat PDF Barcode

Chanuka GeekiyanageChanuka Geekiyanage Nov 5, 2026 870 views

Question details

The user wants to encode PDF form field values in a barcode using a custom delimiter instead of the default XML or tab-delimited data.

How to Use a Custom Delimiter in an Acrobat PDF Barcode
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Creating or modifying a PDF form that requires barcode generation tailored to a specific scanning software's delimiter requirements.
Observed behavior
The user needs a method to replace the default tab delimiter with a custom character, such as a pipe (|), to ensure compatibility with their barcode scanner.
Before you start

Ensure you have access to the PDF form in editing mode and that your target scanning software is configured to properly interpret the custom delimiter you plan to use.

Solution 1Recommended

Use Custom Calculation JavaScript in Acrobat

Modify the barcode field properties using Acrobat's generated code to swap the default tab delimiter for a custom one.

Acrobat provides built-in options for XML and tab-delimited barcode data. By using the custom calculation JavaScript option, you can leverage Acrobat's auto-generated script and simply swap out the delimiter character to meet your scanning software's requirements.

1
Access Barcode Properties

Open your PDF form in Adobe Acrobat and enter Form Editing mode. Right-click the target barcode field and select 'Properties' from the context menu.

2
Generate Base Code

Navigate to the 'Calculate' tab. Initially, choose the tab-delimited option so that Acrobat automatically generates the baseline JavaScript code needed for the barcode.

3
Switch to Custom JavaScript

Change the selection from the tab-delimited option to 'Custom calculation script'. This will reveal the generated code in the text editor.

4
Replace the Delimiter

Locate the tab delimiter in the script (usually represented by '\t') and replace it with your desired custom character, such as the pipe character ('|').

5
Save and Test

Click 'OK' to save your script changes and close the properties window. Test the barcode functionality using your designated scanning software to verify data is extracted correctly.

Use Custom Calculation JavaScript in Acrobat
Syntax check: When modifying the JavaScript, be careful not to accidentally remove any quotes or semicolons, as this will break the script and prevent the barcode from generating correctly.
Free Microsoft Office alternative

Manage PDF Forms Easily with WPS Office

While highly specific barcode scripting is unique to Adobe Acrobat, WPS Office provides a free, lightweight, and incredibly capable alternative for comprehensive PDF document management and Microsoft Office file editing. Its familiar interface ensures seamless transition and everyday ease of use.

Fully compatible with all standard Microsoft Office formats (Word, Excel, PowerPoint) and standard PDFs.Lightweight architecture ensures quick document loading and smooth PDF form editing.Familiar user interface enables seamless migration with practically no learning curve.A cost-effective, free alternative to expensive document management subscriptions.
microsoft office alternative - wps office

Frequently Asked Questions

Can I use any character as a custom delimiter in a PDF barcode?

Yes, you can use most standard ASCII characters like a pipe (|), comma (,), or semicolon (;). However, you must ensure that your downstream barcode scanning software is configured to recognize the specific character you choose as the separator.

Why does my custom delimiter script not work after saving?

This usually happens if there is a syntax error in your JavaScript. Double-check the custom calculation script to ensure you only replaced the delimiter string and didn't accidentally remove any surrounding quotation marks or semicolons from the Acrobat-generated code.

Do I need to write the barcode calculation JavaScript from scratch?

No. Adobe Acrobat will automatically generate the foundational code if you initially select the tab-delimited formatting option in the Calculate tab. You simply switch over to the custom view and edit the delimiter variable.

Is it possible to use XML instead of delimited data for PDF barcodes?

Yes, Acrobat natively supports XML data encoding for barcodes. You can select the XML format option directly from the barcode field's properties dialog without needing to configure any custom JavaScript.