[ 
https://issues.apache.org/jira/browse/PDFBOX-3021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14954756#comment-14954756
 ] 

Maruan Sahyoun commented on PDFBOX-3021:
----------------------------------------

it looks like the name of the font is given as a string instead of a name in 
the font descriptior (name is how it should be). What you could do to verify 
that is look up the fonts and their descriptors using the PDFDebugger and cut 
an paste the snippet of the PDF here to verify if that is correct.

> Class Cast Exception: COSString -> COSName
> ------------------------------------------
>
>                 Key: PDFBOX-3021
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3021
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Text extraction
>    Affects Versions: 2.0.0
>            Reporter: Daniel Scheibe
>
> Following execption is generated while rendering a PDF (unfortunately 
> confidential):
> java.lang.ClassCastException: org.apache.pdfbox.cos.COSString cannot be cast 
> to org.apache.pdfbox.cos.COSName
>                 at 
> org.apache.pdfbox.pdmodel.font.PDFontDescriptor.getFontName(PDFontDescriptor.java:289)
>                 at 
> org.apache.pdfbox.pdmodel.font.ExternalFonts.getFallbackFontName(ExternalFonts.java:294)
>                 at 
> org.apache.pdfbox.pdmodel.font.ExternalFonts.getTrueTypeFallbackFont(ExternalFonts.java:273)
>                 at 
> org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.<init>(PDTrueTypeFont.java:157)
>                 at 
> org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:75)
>                 at 
> org.apache.pdfbox.pdmodel.PDResources.getFont(PDResources.java:96)
>                 at 
> org.apache.pdfbox.contentstream.operator.text.SetFontAndSize.process(SetFontAndSize.java:50)
>                 at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:802)
>                 at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:464)
>                 at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:438)
>                 at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:149)
>                 at 
> org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:179)
>                 at 
> org.apache.pdfbox.rendering.PDFRenderer.renderPage(PDFRenderer.java:205)
>                 at 
> org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:136)
>                 at 
> org.apache.pdfbox.rendering.PDFRenderer.renderImageWithDPI(PDFRenderer.java:95)
> Is this maybe related to https://issues.apache.org/jira/browse/PDFBOX-1756 
> but only in a different spot?
> Hint: Revision of 2.0.0 version trunk is 1704293



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to