Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.4
-
FreeBSD, Openjdk 1.8.0_112, Scala 2.12.0
Description
Attached file works with Acrobat Reader, mupdf, pdftk, and so on.
When using pdfbox to render first page to an image:
16:01:13.042 [run-main-0] WARN o.a.pdfbox.pdmodel.font.PDType1Font - Using fallback font ArialMT for Frutiger
16:01:13.047 [run-main-0] WARN o.a.pdfbox.pdmodel.font.PDType1Font - Using fallback font Arial-BoldMT for Frutiger45,Bold
16:01:13.168 [run-main-0] ERROR o.a.pdfbox.pdmodel.font.PDType1Font - Can't read the embedded Type1 font KIX-Barcode-Regular
java.io.IOException: unexpected closing parenthesis
at org.apache.fontbox.type1.Type1Lexer.readToken(Type1Lexer.java:123)
at org.apache.fontbox.type1.Type1Lexer.nextToken(Type1Lexer.java:75)
at org.apache.fontbox.type1.Type1Parser.parseBinary(Type1Parser.java:468)
at org.apache.fontbox.type1.Type1Parser.parse(Type1Parser.java:64)
at org.apache.fontbox.type1.Type1Font.createWithSegments(Type1Font.java:85)
at org.apache.pdfbox.pdmodel.font.PDType1Font.<init>(PDType1Font.java:262)
at org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:62)
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:829)
at org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:486)
at org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:460)
at org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:150)
at org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:189)
at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:145)
at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:68)
To reproduce (Scala, sorry, but straightforward to reproduce):
val doc = new PDDocument.load(...)
val renderer = new PDFRenderer(doc)
val img = renderer.renderImage(0, 1.0f)