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

Sean Bridges commented on PDFBOX-455:
-------------------------------------

Tried it with the svn revision 773640, and the bug is still there,


java.lang.ClassCastException: org.apache.pdfbox.cos.COSString cannot be cast to 
org.apache.pdfbox.cos.COSName
        at 
org.apache.pdfbox.cos.COSDictionary.getNameAsString(COSDictionary.java:586)
        at 
org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:55)
        at org.apache.pdfbox.pdmodel.PDResources.getFonts(PDResources.java:123)
        at 
org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:194)
        at 
org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:176)
        at 
org.apache.pdfbox.util.PDFTextStripper.processPage(PDFTextStripper.java:358)
        at 
org.apache.pdfbox.util.PDFTextStripper.processPages(PDFTextStripper.java:282)
        at 
org.apache.pdfbox.util.PDFTextStripper.writeText(PDFTextStripper.java:238)
        at 
org.apache.pdfbox.util.PDFTextStripper.getText(PDFTextStripper.java:171)
        at 
message_analyzer.extractor.PDFExtractor.getContent(PDFExtractor.java:38)
        at 
message_analyzer.extractor.AbstractExtractor.extractInfo(AbstractExtractor.java:41)
        at 
message_analyzer.analyzer.AttachmentTester.main(AttachmentTester.java:60)

>  java.lang.ClassCastException: org.pdfbox.cos.COSString cannot be cast to 
> org.pdfbox.cos.COSName
> ------------------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-455
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-455
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 0.7.3
>            Reporter: Sean Bridges
>
> I'm getting this error parsing a pdf file,
> java.lang.ClassCastException: org.pdfbox.cos.COSString cannot be cast to 
> org.pdfbox.cos.COSName
>       at org.pdfbox.pdmodel.font.PDFont.getAFM(PDFont.java:330)
>       at 
> org.pdfbox.pdmodel.font.PDSimpleFont.getFontHeight(PDSimpleFont.java:104)
>       at org.pdfbox.util.PDFStreamEngine.showString(PDFStreamEngine.java:336)
>       at org.pdfbox.util.operator.ShowText.process(ShowText.java:64)
>       at 
> org.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngine.java:452)
>       at 
> org.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:215)
>       at 
> org.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:174)
>       at org.pdfbox.util.PDFTextStripper.processPage(PDFTextStripper.java:336)
>       at 
> org.pdfbox.util.PDFTextStripper.processPages(PDFTextStripper.java:259)
>       at org.pdfbox.util.PDFTextStripper.writeText(PDFTextStripper.java:216)
>       at org.pdfbox.util.PDFTextStripper.getText(PDFTextStripper.java:149)
> Unfortunately, I can't give you the pdf file, but the PDFFont->font->items 
> map for the instance in question is,
> {cosname{fontdescriptor}=org.pdfbox.cos.cosdiction...@1041876, 
> COSName{Subtype}=COSName{TrueType}, COSName{Widths}=COSArray{[COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, COSInt{600}, 
> COSInt{600}, COSInt{600}, COSInt{600}]}, COSName{Encoding}=COSObject{4, 0}, 
> COSName{FirstChar}=COSInt{0}, COSName{Type}=COSName{Font}, 
> COSName{BaseFont}=COSString{Courier New,Bold}, COSName{LastChar}=COSInt{255}}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to