• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Code128 Barcode in Adobe Acrobat Form

New Here ,
Sep 21, 2018 Sep 21, 2018

Copy link to clipboard

Copied

Hi,

My client has a PDF form where you fill out product options then it converts those options into a single text field "Lot Number" then finally a field, "Lot Number Barcode", takes the lot number and converts it to a barcode. For some reason this is not working. I know almost nothing about barcode integration but I am a programmer and just looking for some guidance on this topic.

The "Lot Number Barcode" field uses under properties Calculate->Custom Calculation Script this code. So like I said above it's taking the "Lot Number" field and converting to a string which I believe then the font uses to generate the correct barcode or that is the idea.

event.value = this.getField("Lot No").valueAsString;

I found this post on stackoverflow.com about this topic and it seems like it can be much more involved but I don't understand what he is talking about when he says, "start/stop characters, calculating and including the check digit"...etc:

The first thing you'll need is access to a suitable code 128 bar code font that allows at least editable embedding. You can then use it with a regular text form field and use JavaScript to set the field value correctly. This involves including the start/stop characters, calculating and including the check digit, selecting the code set, and possibly code set shifting. The hardest part can be finding the font.

Stackoverflow: Code128 Barcode in Adobe Acrobat Form

Here is a link to the actual PDF I was given from the client:

https://ufile.io/ihh87

TOPICS
PDF forms

Views

10.8K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 21, 2018 Sep 21, 2018

Copy link to clipboard

Copied

Hey, that was me. It would be helpful if you took some time to read up on how code 128 bar code are constructed. Here's a link that might be helpful: Code 128 Barcode FAQ & Tutorial | IDAutomation

The point is you need to do more than the script you show. It's not necessarily complicated, but you need to at least include the start and stop characters, and calculate the check character.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 22, 2018 Sep 22, 2018

Copy link to clipboard

Copied

I appreciate the resource but I still can't find my unique solution or should say path to the solution I need. That page has too many options for too many different solutions many of them you have to pay for. Maybe you could help answer specific questions which would help me narrow this down a little.

  1. I need a 1D / Linear barcode font correct?
  2. What font should I purchase specifically - For a PDF getting scanned by a reader it should be a universal font correct, Windows, Mac etc? Would CODE 128 be the best option to embed into a PDF https://www.idautomation.com/barcode-fonts/code-128/
  3. Is there anyway to get a FREE version of a CODE 128 font maybe not the whole set but just a single font that will work, Automation.com charges $159 for a single license of the font set.
  4. What Javascript code can I use for a PDF? Is there an example on that page that breaks down how to script the different attributes into a PDF only saw markup for an HTML page
  5. Even having the right code and barcode working correctly I need to be setting the font correctly to display the barcode so the scanner will not error out when trying to read the barcode. This involves the correct font size and font height. The clients PDF currently has that font field set to "Auto" so its never a fixed size and I assuming that is a big problem when trying to scan it? 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 22, 2018 Sep 22, 2018

Copy link to clipboard

Copied

1. Yes, one that allows at least editable embedding. I stress this because some do not, which prevents it from being used with a PDF form field.

2/3. I can't recommend a specific font at the moment (don't have access to my normal resources), but you might be able to find a free one, and a paid one for less than that. If I have time later tonight I'll post something more.

4. Unfortunately, it depends on the font, since every one I've dealt with is different enough that you have to tailor the code to how they chose to set up the font.

5. It's not usually a problem unless the field gets small. Using auto should be fine, but it's easy enough to test. Will there be an upper limit on the number of characters it will be encoding?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 22, 2021 May 22, 2021

Copy link to clipboard

Copied

LATEST

Hi!

 

If you update the link https://ufile.io/ihh87 with your pdf form I can try to apply the solution which I came up with using the FineReader and Word Mail Merge.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines