Skip to main content
Participating Frequently
June 28, 2016
Question

Can not find Barcode of type CODE_128 and CODE_93 in Acrobat Pro Dc.

  • June 28, 2016
  • 5 replies
  • 5945 views

Hi,

I am going to create a template where i need to have a barcode place holder and this place holder will be replaced with the actual value during the java program execution(Using PDFBOX ).But i am unable find how to place a barcode(code 128, code 93) place holders in adobe pro dc. Could you please help me how to achieve this functionality using pro dc?

Thanks

Venkata

This topic has been closed for replies.

5 replies

Participating Frequently
June 28, 2016

I am using PdfBox java library.  I am not sure how to use javascript  in the text field control. I tested initially without java program like this. But in that case also the text field is not showing the barcode. The steps are 1 . Created A pdf template 2. Click the tools section and intern clicked prepare form 3. Drag the text control. 4. Edit the text field and gave the General tab property name as 'pobarcode' 5.In appearance tab selected font as Code 128. 6. Options tab, given a default value for testing "123456".7. Saved the file.

try67
Community Expert
Community Expert
June 28, 2016

This is not really the place to discuss PDFBox. I recommend StackOverflow or the PDFBox mailing-list (users@pdfbox.apache.org).

If the field didn't work in Acrobat, though, then there might be something wrong with the font you're using.

Participating Frequently
June 28, 2016

Yes. you are right. i was using corrupted code 128 font it seems. i have uploaded a new copy of code 128 font into the windows/fonts directory. Now i am able to see the barcode. Thanks for your help.

Participating Frequently
June 28, 2016

Yeah i already set the text field font as barcode font (Code 128)

try67
Community Expert
Community Expert
June 28, 2016

You're saying you're using java. What exact library are you using to do this?

Does it work if you edit this field's value in Acrobat using JavaScript? If so, it might be that the "NeedsAppearances" flag needs to be set, to force the field's contents to be refreshed when the file is opened.

Participating Frequently
June 28, 2016

It is showing the actual text value (123456 ) in the pdf. The text field is not showing the barcode.

try67
Community Expert
Community Expert
June 28, 2016

You need to set the field's text font to the barcode font...

Legend
June 28, 2016

The "PDF barcode form fields" article is irrelevant for this issue here, because it covers only 2D-barcodes. And it also has nothing to do with JavaScript (but good for you, as JavaScript is one of the forums I follow).

1D barcodes can be represented with special fonts, and therefore, you would find a font for your symbology, set up a regular text field, specify the font, and then have your logic add the right string; depending on the symbology, you may have to do some fine-tuning.

Hope this can help.

Participating Frequently
June 28, 2016

Hi venkatak26697816 ,

Please refer to this article :- PDF barcode form fields

Regards,

Yatharth 

Participating Frequently
June 28, 2016

moving to JavaScript