Hello,

The POST table of the font is incorrect. You can open the font with DTL OTMaster 3.7 light (a very nice software), go to "post names". You'll see (at the bottom) the name "0" with the glyph index 302. However there is no glyph at 302 in the glyf table. That index doesn't exist.

In the cmap tables the "0" points to index 44. That one is empty. The "0" glyph would be at index 1 or 11.

I don't know how openoffice did it, I don't have openoffice/libreoffice, and I didn't try on MS Office (for security reasons).

There is a different EAN13 font at
https://grandzebu.net/informatique/codbar-en/ean13.htm

but that one uses a different way to encode what you want, i.e. "0" is "K" or "A" or "a". The website has a table on how to use this.

Tilman

Am 27.03.2019 um 08:49 schrieb Alberto Mancini:
Hello, thanks.

The repro with the used font is available here:
https://github.com/abmancini/pdfbarcode

two images of the result with pdfbox and openoffice are here:
https://github.com/abmancini/pdfbarcode/wiki

Regards,
    Alberto.


On Wed, Mar 27, 2019 at 7:34 AM Tilman Hausherr <[email protected]>
wrote:

yes, please upload font, Java code and pdf to a sharehoster. (mail
attachments don't work)
Tulman


------------------------------------------------------------------------
Gesendet mit der Telekom Mail App
<
https://kommunikationsdienste.t-online.de/redirects/email_app_android_sendmail_footer


--- Original-Nachricht ---
Von: Alberto Mancini
Betreff: Problem rendering barcode font
Datum: 27.03.2019, 6:56 Uhr
An: [email protected]





Hi Community,
i'm using pdfbox to create a pdf-document from scratch and everything works
well but the creation of a barcode using a barcode font.

Essentially we have a font for the ean13 barcode in ttf format and it
seems to work; when i install it on my mac and use it with openoffice the
barcode is rendered correctly.
But if i use the same ttf font with pdfbox i get a wrong result (only part
of the barcode seems drawn).

I'm far from being an expert of fonts and formats but i tried to analyze
the font and the problem but i found no way.
Can you suggest something to look?
If useful i can provide the font and a simple reproducer too of course.

Thank you very much,
Alberto.



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to