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

cfdocument: barcode printed with wrong spacing

Community Beginner ,
Jun 05, 2015 Jun 05, 2015

Hi,

in CF10, I'm trying to print barcodes with ttf barcode fonts inside a PDF document generated with the cfdocument tag. The barcode is generated, but with wrong spacing.

The code printing the barcode is quite simple:

<span style='font-family:Code-39-25-DMI;font-size:32.0pt;letter-spacing:0px'>*BKUM70709997B*</span>

This is what it should look like:

BC_right.png

cfdocument renders the barcode like this:

BC_wrong.png

The spacing between the individual barcode characters is wrong. The "letter-spacing" CSS option doesn't make andy difference. Any idea for a solution?

Regards, Richard

546
Translate
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
Advocate ,
Jun 05, 2015 Jun 05, 2015

Just posted this a moment ago on another thread RE css and cfdocument.

https://forums.adobe.com/message/7612172#7612172

letter-spacing will not be support inside cfdocument.

You will be reliant on the font style itself. Note as well that some barcodes only work at certain font sizes. If you adjust the font size down does this change the spacing?

Translate
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
Community Beginner ,
Jun 05, 2015 Jun 05, 2015
LATEST

I'm aware that the letter-spacing CSS attribute is not on the list of supported attributes for cfdocument, but in my experience this list contains errors, so I thought I'd just try it out. If it' not supported, it is just ignored.

Leaving out the font-size and letter-spacing attributes doesn't make any difference for the spacing issue, there are still gaps between the individual barcode "characters" which render the barcode unreadable. I tried different TTF barcode fonts that work just fine in Windows. Our CF server runs under Linux.

Translate
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
Resources