You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (JIRA)" <ji...@apache.org> on 2016/09/29 17:17:20 UTC
[jira] [Commented] (PDFBOX-3518) ClassCastException rendering Type3
font
[ https://issues.apache.org/jira/browse/PDFBOX-3518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15533379#comment-15533379 ]
Andreas Lehmkühler commented on PDFBOX-3518:
--------------------------------------------
[~torakiki] I've added you as watcher to the other ticket
> ClassCastException rendering Type3 font
> ---------------------------------------
>
> Key: PDFBOX-3518
> URL: https://issues.apache.org/jira/browse/PDFBOX-3518
> Project: PDFBox
> Issue Type: Bug
> Components: Rendering
> Affects Versions: 2.0.3
> Reporter: Andrea Vacondio
> Assignee: Andreas Lehmkühler
> Priority: Minor
>
> Using the PDFBox Debugger to render a page we get this exception:
> {code}
> Caused by: java.lang.ClassCastException: org.apache.pdfbox.cos.COSName cannot be cast to org.apache.pdfbox.cos.COSDictionary
> org.apache.pdfbox.pdmodel.font.PDType3Font.readEncoding(PDType3Font.java:69)
> org.apache.pdfbox.pdmodel.font.PDType3Font.<init>(PDType3Font.java:57)
> org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:79)
> org.apache.pdfbox.pdmodel.PDResources.getFont(PDResources.java:143)
> org.apache.pdfbox.contentstream.operator.text.SetFontAndSize.process(SetFontAndSize.java:60)
> org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:815)
> org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:472)
> org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:446)
> org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:149)
> org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:189)
> org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:145)
> org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:68)
> org.apache.pdfbox.debugger.pagepane.PagePane$RenderWorker.doInBackground(PagePane.java:236)
> org.apache.pdfbox.debugger.pagepane.PagePane$RenderWorker.doInBackground(PagePane.java:1)
> java.lang.Thread.run(Thread.java:745)
> {code}
> where this is the Type3 font dictionary
> {code}
> /inlineImage5: 21 0 R -> Dictionary of type: /Font
> Dictionary of type: /Font
> /Name: /inlineImage5
> /FirstChar: 97
> /Subtype: /Type3
> /Type: /Font
> /CharProcs: Dictionary
> /FontBBox: [0, 0, 1000.0, 947.36842]
> /Encoding: /WinAnsiEncoding
> /FontMatrix: [0.001, 0, 0, 0.001, 0, 0]
> /Resources: 83 0 R -> Dictionary
> /LastChar: 97
> /Widths: [1000.0]
> {code}
> I assume the issue is the Encoding that is supposed to be a dictionary while in this case is a name but I'm not really an expert in this area. The doc displays fine with every reader I tried (Acrobat, PDFjs, Evince ...)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org