Hello Tilman, thank you, indeed using the font you suggested works without problems. Great !
For the sake of curiosity i compared the encoded strings for the same code with my original font and with the working one: not working: _8*L0G0L4G1G7L2**R0R6R0R4R0R6* working: 8AKELRC*agaeag+ both render (using openoffice the first and pdfbox the second) to the same barcode (i checked that both are also readable by my phone's barcode scanner) and actually the one not working has an encoded string way longer, maybe that the incorrect font works only with ligatures? Anyway my problem is solved. Thank you very much, Alberto. On Wed, Mar 27, 2019 at 7:21 PM Tilman Hausherr <[email protected]> wrote: > 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] > >

