Hi Rob, sometimes it is important to find the right order to do things in pdfbox, see [1] for further details.
HTH Andreas Lehmkühler [1] http://markmail.org/message/ysafey2beslqq2oh ----- original Nachricht -------- Betreff: RE: How do you add BarCode 39 Gesendet: Mo, 24. Aug 2009 Von: Rob Bradley<r...@ttlco.com> > Thanks Andreas, > > I am now using loadTTL to test different fonts. > > I have been able to load in my test app "Times Roman" or the file > "timr45w.ttf" with no problems. > > However, every one of my BarCode fonts create documents fine but when opened > in Adobe Reader it gets: > "Cannot extract the embedded font 'IDAutomationHC39M'. Some characters may > not display or print correctly." > > Because the same code works fine with Times Roman I am assuming it has to do > with the fonts themselves. > > So far I have tried: > IDAutomationHC39 (from IDAutomation.com) > AdvHC39a (from bizfonts.com) > Free2of9 (from barcodesinc.com) > > Am I on the right track or do I need to address the "Cannot extract" error? > > Thanks > Rob Bradley > > -----Original Message----- > From: Andreas Lehmkühler [mailto:andr...@lehmi.de] > Sent: Sunday, August 23, 2009 11:04 AM > To: pdfbox-users@incubator.apache.org > Subject: Re: How do you add BarCode 39 > > Hi Rob, > > Rob Bradley schrieb: > > I need to add a barcode 39 to new pdf documents. Does anyone have an > example? I would assume it is just a matter of loading a font. > > > > I have everything else working well, but I just have done much with fonts > other than the defaults yet. > If your font is a truetype try something like this before adding some > text to the document: > > PDDocument doc = PDDocument.load( ... ); > PDFont font = PDTrueTypeFont.loadTTF(doc, new File("SpecialFont.ttf")); > > BR > Andreas Lehmkühler > --- original Nachricht Ende ----