Aw: Re: Type1Glyph2D No glyph for 41 (.notdef) in font Helvetica
John, thanks a lot! Latest pdfbox-app (pdfbox-app-2.0.0-20150204.020053-1023.jar) works nicely under Windows 8.1 with a pdf file without embedded fonts. Thanks again Andreas Gesendet: Mittwoch, 04. Februar 2015 um 02:06 Uhr Von: John Hewson j...@jahewson.com An: users@pdfbox.apache.org, Andreas Lüdtke andi.lued...@gmx.de Betreff: Re: Type1Glyph2D No glyph for 41 (.notdef) in font Helvetica I found the problem. It should be fixed in the next snapshot build. -- John On 1 Feb 2015, at 04:13, Andreas Lüdtke andi.lued...@gmx.de wrote: John, thank you for the quick response! I just tried pdfbox-app-2.0.0-20150201.120136-1008.jar and now I get the below shown exception while converting the pdf to an image. Hope it helps you to track it down. Andreas D:\__testjava -jar pdfbox-app-2.0.0-20150201.120136-1008.jar PDFToImage rg-1234567890BA.pdf Exception in thread main java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.codePointAt(Unknown Source) at org.apache.fontbox.ttf.TrueTypeFont.parseUniName(TrueTypeFont.java:509) at org.apache.fontbox.ttf.TrueTypeFont.nameToGID(TrueTypeFont.java:479) at org.apache.fontbox.ttf.TrueTypeFont.hasGlyph(TrueTypeFont.java:560) at org.apache.pdfbox.pdmodel.font.PDType1Font.codeToName(PDType1Font.java:446) at org.apache.pdfbox.pdmodel.font.PDType1Font.getWidthFromFont(PDType1Font.java:338) at org.apache.pdfbox.pdmodel.font.PDFont.getWidth(PDFont.java:241) at org.apache.pdfbox.pdmodel.font.PDFont.getDisplacement(PDFont.java:211) at org.apache.pdfbox.contentstream.PDFStreamEngine.showText(PDFStreamEngine.java:687) at org.apache.pdfbox.rendering.PageDrawer.showText(PageDrawer.java:280) at org.apache.pdfbox.contentstream.PDFStreamEngine.showTextStrings(PDFStreamEngine.java:601) at org.apache.pdfbox.contentstream.operator.text.ShowTextAdjusted.process(ShowTextAdjusted.java:38) at org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:803) at org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:465) at org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:439) at org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:149) at org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:163) at org.apache.pdfbox.rendering.PDFRenderer.renderPage(PDFRenderer.java:204) at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:137) at org.apache.pdfbox.rendering.PDFRenderer.renderImageWithDPI(PDFRenderer.java:96) at org.apache.pdfbox.tools.PDFToImage.main(PDFToImage.java:236) at org.apache.pdfbox.tools.PDFBox.main(PDFBox.java:89) -- Originalnachricht -- Von: John Hewson j...@jahewson.com mailto:j...@jahewson.com An: users@pdfbox.apache.org mailto:users@pdfbox.apache.org; Andreas Lüdtke andi.lued...@gmx.de mailto:andi.lued...@gmx.de Gesendet: 31.01.2015 20:25:36 Betreff: Re: Type1Glyph2D No glyph for 41 (.notdef) in font Helvetica Thanks Andreas. I tool a look at the arial.ttf file which you sent me and the problem was as I had suspected - Microsoft have changed the tables in the Windows 8.1 version of the font. PDFBox relies on the PostScript glyph names in the ‘post’ table when substituting a TTF in place of a Type 1 font. However, the new Windows 8.1 version of Arial uses a format 3 ‘post’ table which does not include any names. That means that every glyph lookup fails. The solution is to extended FontBox's TrueTypeFont class to allow looking up of PostScript names by mapping them to entries in the ‘cmap’ table. I’ve opened PDFBOX-2650 to address this. Thanks for taking the time to report this and provide the necessary details. -- John On 31 Jan 2015, at 05:45, Andreas Lüdtke andi.lued...@gmx.de wrote: John, I forgot that I have a Windows 8.1 tablet at home: so here is the output of pdfbox-app. I copied only the first lines since they are basically the same: D:\__testjava -jar pdfbox-app-2.0.0-20150129.180809-996.jar PDFToImage rg-1234567890BA.pdf Jan 31, 2015 2:34:34 PM org.apache.pdfbox.rendering.font.Type1Glyph2D getPathForCharacterCode WARNUNG: No glyph for 77 (.notdef) in font Helvetica Jan 31, 2015 2:34:34 PM org.apache.pdfbox.rendering.font.Type1Glyph2D getPathForCharacterCode WARNUNG: No glyph for 97 (.notdef) in font Helvetica Jan 31, 2015 2:34:34 PM org.apache.pdfbox.rendering.font.Type1Glyph2D getPathForCharacterCode WARNUNG: No glyph for 114 (.notdef) in font Helvetica Jan 31, 2015 2:34:34 PM org.apache.pdfbox.rendering.font.Type1Glyph2D getPathForCharacterCode WARNUNG: No glyph for 107 (.notdef) in font Helvetica Jan 31, 2015 2:34:34 PM org.apache.pdfbox.rendering.font.Type1Glyph2D getPathForCharacterCode WARNUNG: No glyph for 117 (.notdef) in font Helvetica I send you the font off list. bestr regards Andreas -- Originalnachricht -- Von: John
Aw: Re: Type1Glyph2D No glyph for 41 (.notdef) in font Helvetica
Hi John, I tried pdfbox-app-2.0.0-20150203.010142-1018.jar this morning and I still get the Exception in thread main java.lang.StringIndexOutOfBoundsException: String index out of range: 0. Can I help you fix this? Andreas Gesendet: Samstag, 31. Januar 2015 um 20:25 Uhr Von: John Hewson j...@jahewson.com An: users@pdfbox.apache.org, Andreas Lüdtke andi.lued...@gmx.de Betreff: Re: Type1Glyph2D No glyph for 41 (.notdef) in font Helvetica Thanks Andreas. I tool a look at the arial.ttf file which you sent me and the problem was as I had suspected - Microsoft have changed the tables in the Windows 8.1 version of the font. PDFBox relies on the PostScript glyph names in the ‘post’ table when substituting a TTF in place of a Type 1 font. However, the new Windows 8.1 version of Arial uses a format 3 ‘post’ table which does not include any names. That means that every glyph lookup fails. The solution is to extended FontBox's TrueTypeFont class to allow looking up of PostScript names by mapping them to entries in the ‘cmap’ table. I’ve opened PDFBOX-2650 to address this. Thanks for taking the time to report this and provide the necessary details. -- John On 31 Jan 2015, at 05:45, Andreas Lüdtke andi.lued...@gmx.de wrote: John, I forgot that I have a Windows 8.1 tablet at home: so here is the output of pdfbox-app. I copied only the first lines since they are basically the same: D:\__testjava -jar pdfbox-app-2.0.0-20150129.180809-996.jar PDFToImage rg-1234567890BA.pdf Jan 31, 2015 2:34:34 PM org.apache.pdfbox.rendering.font.Type1Glyph2D getPathForCharacterCode WARNUNG: No glyph for 77 (.notdef) in font Helvetica Jan 31, 2015 2:34:34 PM org.apache.pdfbox.rendering.font.Type1Glyph2D getPathForCharacterCode WARNUNG: No glyph for 97 (.notdef) in font Helvetica Jan 31, 2015 2:34:34 PM org.apache.pdfbox.rendering.font.Type1Glyph2D getPathForCharacterCode WARNUNG: No glyph for 114 (.notdef) in font Helvetica Jan 31, 2015 2:34:34 PM org.apache.pdfbox.rendering.font.Type1Glyph2D getPathForCharacterCode WARNUNG: No glyph for 107 (.notdef) in font Helvetica Jan 31, 2015 2:34:34 PM org.apache.pdfbox.rendering.font.Type1Glyph2D getPathForCharacterCode WARNUNG: No glyph for 117 (.notdef) in font Helvetica I send you the font off list. bestr regards Andreas -- Originalnachricht -- Von: John Hewson j...@jahewson.com mailto:j...@jahewson.com An: users@pdfbox.apache.org mailto:users@pdfbox.apache.org Gesendet: 30.01.2015 21:27:43 Betreff: Re: Type1Glyph2D No glyph for 41 (.notdef) in font Helvetica Your list of fonts looks normal, Helvetica gets mapped to ArialMT on Windows. I wonder if the Arial font has changed on Windows 8.1 in a way which is causing PDFBox to parse it incorrectly? If you send me C:\Windows\FONTS\arial.ttf off-list, I can take a look at it. When you run pdfbox-app do you see any other font-related messages in the log? -- John On 29 Jan 2015, at 23:05, Andreas Lüdtke andi.lued...@gmx.de wrote: John, below you can find the output from a Windows 8.1 machine. When I run the test on a Windows 7 machine I have also no problems with the generated image. If you want me to run other tests, please let me know. Best regards Andreas output from DumpFonts on Windows 8.1 Enterprise 64bit: --- TTF: UtsaahItalic: C:\Windows\FONTS\utsaahi.ttf TTF: LeelawadeeUIBold: C:\Windows\FONTS\LeelaUIb.ttf TTF: GeorgiaItalic: C:\Windows\FONTS\georgiai.ttf TTF: DilleniaUPCItalic: C:\Windows\FONTS\upcdi.ttf TTF: Vrinda: C:\Windows\FONTS\vrinda.ttf TTF: IskoolaPotaBold: C:\Windows\FONTS\iskpotab.ttf TTF: JavaneseText: C:\Windows\FONTS\javatext.ttf TTF: Bauhaus93: C:\Windows\FONTS\BAUHS93.TTF TTF: BookAntiqua-Italic: C:\Windows\FONTS\ANTQUAI.TTF TTF: BookAntiquaItalic: C:\Windows\FONTS\ANTQUAI.TTF TTF: LucidaBright-Demi: C:\Windows\FONTS\LBRITED.TTF TTF: UrduTypesetting-Bold: C:\Windows\FONTS\UrdTypeb.ttf TTF: TraditionalArabicBold: C:\Windows\FONTS\tradbdo.ttf TTF: YuMinchoDemibold: C:\Windows\FONTS\yumindb.ttf TTF: Corbel-Italic: C:\Windows\FONTS\corbeli.ttf TTF: NiagaraSolidReg: C:\Windows\FONTS\NIAGSOL.TTF TTF: SegoeUI-LightItalic: C:\Windows\FONTS\seguili.ttf TTF: EucrosiaUPCItalic: C:\Windows\FONTS\upcei.ttf TTF: Tahoma: C:\Windows\FONTS\tahoma.ttf TTF: CenturyGothic-Italic: C:\Windows\FONTS\GOTHICI.TTF TTF: Mangal-Bold: C:\Windows\FONTS\mangalb.ttf TTF: Aparajita: C:\Windows\FONTS\aparaj.ttf TTF: ArialBoldItalicMT: C:\Windows\FONTS\arialbi.ttf TTF: LucidaFax-DemiItalic: C:\Windows\FONTS\LFAXDI.TTF TTF: GaramondItalic: C:\Windows\FONTS\GARAIT.TTF TTF: Modern-Regular: C:\Windows\FONTS\MOD20.TTF TTF: NiagaraSolid-Reg: C:\Windows\FONTS\NIAGSOL.TTF TTF: CourierNewPSBoldMT: C:\Windows\FONTS\courbd.ttf TTF: SegoeUI: C:\Windows\FONTS\segoeui.ttf TTF: Aharoni-Bold: C:\Windows\FONTS\ahronbd.ttf TTF: Harrington: C:\Windows\FONTS\HARNGTON.TTF TTF: CandaraItalic:
Re: Aw: Re: Type1Glyph2D No glyph for 41 (.notdef) in font Helvetica
Hi, Andreas Lüdtke andi.lued...@gmx.de hat am 29. Januar 2015 um 08:51 geschrieben: Hi Tilman, you will find the pdf file here: https://www.dropbox.com/s/4v6tnroz6a8imsp/rg-1234567890BA.pdf?dl=0 The converted image is here: https://www.dropbox.com/s/rqnuou03elxrgb6/rg-1234567890BA1.jpg?dl=0 In this case I used pdfbox-app-2.0.0-20150127.230110-988.jar to generate the image but the result is the same when I use my app. BTW: if the pdf has all fonts embedded, I don't have this problem. There seems to be an issue with our font mapping if the fonts aren't embedded. Besides, IMO you have to think about your font handling, especially as you're creating the pdfs yourself. It's always a bad idea not to include the used fonts, as the used reader has to map the missing fonts somehow and such a replacement may lead to not that perfect renderings. BR Andreas Lehmkühler Gesendet: Mittwoch, 28. Januar 2015 um 17:45 Uhr Von: Tilman Hausherr thaush...@t-online.de An: users@pdfbox.apache.org Betreff: Re: Type1Glyph2D No glyph for 41 (.notdef) in font Helvetica Please upload a sample file somewhere and post the url Tilman Am 28.01.2015 um 10:37 schrieb Andreas Lüdtke: Hi, I'm using pdfbox 2.0.0 version trunk from yesterday and I get a lot of such warning messages when I convert a pdf file to an image. The pdf file has NO embedded fonts. The resulting images are pretty empty beside some images and lines: no single character is visible. I read somewhere that current versions of pdfbox 2.0.0 should handle these fonts properly, but I can't confirm this. I use jdk 1.7.0_72 on windows 8.1 64bit. How can I make the characters visible in the converted images? Best regards Andreas - To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org For additional commands, e-mail: users-h...@pdfbox.apache.org - To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org For additional commands, e-mail: users-h...@pdfbox.apache.org
Aw: Re: Type1Glyph2D No glyph for 41 (.notdef) in font Helvetica
Hi Tilman, you will find the pdf file here: https://www.dropbox.com/s/4v6tnroz6a8imsp/rg-1234567890BA.pdf?dl=0 The converted image is here: https://www.dropbox.com/s/rqnuou03elxrgb6/rg-1234567890BA1.jpg?dl=0 In this case I used pdfbox-app-2.0.0-20150127.230110-988.jar to generate the image but the result is the same when I use my app. BTW: if the pdf has all fonts embedded, I don't have this problem. Gesendet: Mittwoch, 28. Januar 2015 um 17:45 Uhr Von: Tilman Hausherr thaush...@t-online.de An: users@pdfbox.apache.org Betreff: Re: Type1Glyph2D No glyph for 41 (.notdef) in font Helvetica Please upload a sample file somewhere and post the url Tilman Am 28.01.2015 um 10:37 schrieb Andreas Lüdtke: Hi, I'm using pdfbox 2.0.0 version trunk from yesterday and I get a lot of such warning messages when I convert a pdf file to an image. The pdf file has NO embedded fonts. The resulting images are pretty empty beside some images and lines: no single character is visible. I read somewhere that current versions of pdfbox 2.0.0 should handle these fonts properly, but I can't confirm this. I use jdk 1.7.0_72 on windows 8.1 64bit. How can I make the characters visible in the converted images? Best regards Andreas - To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org For additional commands, e-mail: users-h...@pdfbox.apache.org