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

Tilman Hausherr commented on PDFBOX-1835:
-----------------------------------------

Thanks for a truly excellent research, with source code and all :-) Saved me a 
lot of time.

{code}
207 0 obj
<<
/Type /Catalog
/Pages 132 0 R
/PageMode /UseOutlines
/OpenAction [ 1 0 R /XYZ null null 0 ]
/ViewerPreferences << /FitWindow true /CenterWindow true >>
/Outlines 166 0 R
/Lang (]¾55O)
/Producer 
(\005]7L\007”øn\034ꬽkr\020°\002ØäF\033Õî\006¼±ã\024ƒKÐó!¯çD¸–Å|:c\000\f㙀\r&tèñZƒg=\004åoE€\003u…ÖQõ9Àe¨Ò\034Ö/)
/Creator (\005]7L\007”ù\037\034ꬿkr\020¼\002Øå7\033Õìu¼±â\020)
/Author 
(\005]7L\007”øm\034ê­Ëkr\021·\002Øä1\033Õìu¼±â\020ƒKÑñ!«îD¸”À|:b\007\fãð\r&u›ñZ‚a=\004åmE€\007\000…ÖTô9ÀaØÒ\034Ò,qÖŸˆ[)
/Title ()
/Subject ()
/Keywords ()
/CreationDate (}á*A:\016•ü\030\035ë­½jv\020®\002Úõ3\033Â)
/ModDate (}á*A:\016•ü\030\035ë­½iw\037®\002Úõ3\033Â)
>>
{code}

This is a weird PDF - the /info and the /catalog objects have been mixed. The 
TIKA code that displays "all the rest" (line 263) of the metadata thus tries to 
display the outlines, and there must be a recursion somewhere.

So what could be done?
- remove that code segment
or
- change addMetadata so that it only gets metadata when it is a COSString. If 
not, just display the key and the type.

> Stackoverflow pdfbox 1.8.3
> --------------------------
>
>                 Key: PDFBOX-1835
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1835
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 1.8.3
>         Environment: CentOS6
> Java 7
>            Reporter: Johnny Minty
>
> I guys I'm using Apache Tika in an application which uses PDFbox for PDF 
> parsing.
> When trying to read in a specific PDF attachment i'm receiving the following 
> stack overflow:
> Caused by: java.lang.StackOverflowError
>         at java.lang.String.valueOf(String.java:2854)
>         at java.lang.StringBuilder.append(StringBuilder.java:128)
>         at 
> org.apache.pdfbox.cos.COSDictionary.toString(COSDictionary.java:1450)
>         at 
> org.apache.pdfbox.cos.COSDictionary.toString(COSDictionary.java:1453)
>         at 
> org.apache.pdfbox.cos.COSDictionary.toString(COSDictionary.java:1453)
>         at 
> org.apache.pdfbox.cos.COSDictionary.toString(COSDictionary.java:1453)
>         at 
> org.apache.pdfbox.cos.COSDictionary.toString(COSDictionary.java:1453)
>         at 
> org.apache.pdfbox.cos.COSDictionary.toString(COSDictionary.java:1453)
>         at 
> org.apache.pdfbox.cos.COSDictionary.toString(COSDictionary.java:1453)
>         at 
> org.apache.pdfbox.cos.COSDictionary.toString(COSDictionary.java:1453)



--
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