[ 
https://issues.apache.org/jira/browse/PDFBOX-4521?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Oliver Mannion updated PDFBOX-4521:
-----------------------------------
    Description: 
The following exception
{code:java}
Cause: java.lang.ClassCastException: org.apache.pdfbox.cos.COSName cannot be 
cast to org.apache.pdfbox.cos.COSDictionary at 
org.apache.pdfbox.pdmodel.PDDocument.getDocumentInformation(PDDocument.java:740)
 at org.apache.tika.parser.pdf.PDFParser.extractMetadata(PDFParser.java:242) at 
org.apache.tika.parser.pdf.PDFParser.parse(PDFParser.java:154) at 
org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280) at 
org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280) at 
org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:135){code}
is generated by PDF documents that have no value in the file trailer for the 
{{Info}} key, eg:
{code:java}
<< /Size 50/Root 8 0 R/Info /ID >>
{code}
According to the [PDF 
spec|http://wwwimages.adobe.com/www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/pdf_reference_1-7.pdf]
 the {{Info}} key is optional. PDFBox correctly handles the case when there is 
no {{Info}} key and no value is present, but in this case, the key is present 
but without a value.

  was:
The following exception
{code:java}
Cause: java.lang.ClassCastException: org.apache.pdfbox.cos.COSName cannot be 
cast to org.apache.pdfbox.cos.COSDictionary at 
org.apache.pdfbox.pdmodel.PDDocument.getDocumentInformation(PDDocument.java:740)
 at org.apache.tika.parser.pdf.PDFParser.extractMetadata(PDFParser.java:242) at 
org.apache.tika.parser.pdf.PDFParser.parse(PDFParser.java:154) at 
org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280) at 
org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280) at 
org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:135){code}
is generated by PDF documents that have no value in the file trailer for the 
{{Info}} key, eg:
{code:java}
<< /Size 50/Root 8 0 R/Info /ID >>
{code}
According to the [PDF 
spec|[http://wwwimages.adobe.com/www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/pdf_reference_1-7.pdf]
 the {{Info}} key is optional. PDFBox correctly handles the case when there is 
no {{Info}} key and no value is present, but in this case, the key is present 
but without a value.


> Missing Info value from file trailer: org.apache.pdfbox.cos.COSName cannot be 
> cast to org.apache.pdfbox.cos.COSDictionary
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-4521
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4521
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Parsing
>    Affects Versions: 2.0.15
>            Reporter: Oliver Mannion
>            Priority: Major
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> The following exception
> {code:java}
> Cause: java.lang.ClassCastException: org.apache.pdfbox.cos.COSName cannot be 
> cast to org.apache.pdfbox.cos.COSDictionary at 
> org.apache.pdfbox.pdmodel.PDDocument.getDocumentInformation(PDDocument.java:740)
>  at org.apache.tika.parser.pdf.PDFParser.extractMetadata(PDFParser.java:242) 
> at org.apache.tika.parser.pdf.PDFParser.parse(PDFParser.java:154) at 
> org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280) at 
> org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280) at 
> org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:135){code}
> is generated by PDF documents that have no value in the file trailer for the 
> {{Info}} key, eg:
> {code:java}
> << /Size 50/Root 8 0 R/Info /ID >>
> {code}
> According to the [PDF 
> spec|http://wwwimages.adobe.com/www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/pdf_reference_1-7.pdf]
>  the {{Info}} key is optional. PDFBox correctly handles the case when there 
> is no {{Info}} key and no value is present, but in this case, the key is 
> present but without a value.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to