Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
2.0.9
-
Patch, Important
Description
When running PDFBox on a pdf with WinAnsiEncoding for a Type3 font it crashes without any output.
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)
edit by tilman
font is here:
Root/Pages/Kids/[0]/Resources/XObject/X1/Resources/XObject/X3/Resources/Font/F10/Encoding
Attachments
Attachments
Issue Links
- is duplicated by
-
PDFBOX-3513 PDFType3Font can have Encoding which is not a COSDictionary
- Closed