[ https://issues.apache.org/jira/browse/PDFBOX-4228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16487683#comment-16487683 ]
ASF subversion and git services commented on PDFBOX-4228: --------------------------------------------------------- Commit 1832112 from [~tilman] in branch 'pdfbox/trunk' [ https://svn.apache.org/r1832112 ] PDFBOX-4228: fix ClassCastException and bug that prevented the use of a name for encoding in type3 fonts, by Daniel Persson > PDFBox crashes when a Type3 font don't have an embedded encoding. > ----------------------------------------------------------------- > > Key: PDFBOX-4228 > URL: https://issues.apache.org/jira/browse/PDFBOX-4228 > Project: PDFBox > Issue Type: Bug > Components: PDModel > Affects Versions: 2.0.9 > Reporter: Daniel Persson > Priority: Critical > Labels: patch, type3 > Fix For: 2.0.10, 3.0.0 PDFBox > > Attachments: example.pdf, type3_fixed.patch > > > When running PDFBox on a pdf with WinAnsiEncoding for a Type3 font it crashes > without any output. > {code:java} > Exception in thread "main" java.lang.ClassCastException: > org.apache.pdfbox.cos.COSName cannot be cast to > org.apache.pdfbox.cos.COSDictionary > at > org.apache.pdfbox.pdmodel.font.PDType3Font.readEncoding(PDType3Font.java:82) > at org.apache.pdfbox.pdmodel.font.PDType3Font.<init>(PDType3Font.java:66) > at > org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:79) > at org.apache.pdfbox.pdmodel.PDResources.getFont(PDResources.java:143) > at > org.apache.pdfbox.contentstream.operator.text.SetFontAndSize.process(SetFontAndSize.java:60) > at > org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:841) > at > org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:498) > at > org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:472) > at > org.apache.pdfbox.contentstream.PDFStreamEngine.showForm(PDFStreamEngine.java:181) > at > org.apache.pdfbox.contentstream.operator.DrawObject.process(DrawObject.java:65) > at > org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:841) > at > org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:498) > at > org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:472) > at > org.apache.pdfbox.contentstream.PDFStreamEngine.showForm(PDFStreamEngine.java:181) > at > org.apache.pdfbox.contentstream.operator.DrawObject.process(DrawObject.java:65) > at > org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:841) > at > org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:498) > at > org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:472) > at > org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:150) > at > org.apache.pdfbox.text.LegacyPDFStreamEngine.processPage(LegacyPDFStreamEngine.java:141) > at > org.apache.pdfbox.text.PDFTextStripper.processPage(PDFTextStripper.java:360) > at > org.apache.pdfbox.text.PDFTextStripper.processPages(PDFTextStripper.java:288) > at org.apache.pdfbox.text.PDFTextStripper.writeText(PDFTextStripper.java:235) > at org.apache.pdfbox.tools.ExtractText.startExtraction(ExtractText.java:237) > at org.apache.pdfbox.tools.ExtractText.main(ExtractText.java:82) > at org.apache.pdfbox.tools.PDFBox.main(PDFBox.java:59) > {code} > edit by [~tilman] > font is here: > {noformat} > Root/Pages/Kids/[0]/Resources/XObject/X1/Resources/XObject/X3/Resources/Font/F10/Encoding > {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org