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

Tilman Hausherr commented on PDFBOX-3514:
-----------------------------------------

You didn't tell who should call getDictionaryHash so I can only guess, that you 
want it to be called by toString() at some point. It would of course limit 
output strongly, which may or may not be useful.

I never call toString on dictionaries for that reason... but then I realize it 
might happen on or error output in productive applications, so we should do 
something.

How about a different solution: have a second toString() method with a max 
level parameter, e.g. 5. This one is passed only to COSDictionary toString() 
calls with a decreased value. When the value reaches 0, the output ends.

> Stackoverflow exception
> -----------------------
>
>                 Key: PDFBOX-3514
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3514
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Parsing
>    Affects Versions: 2.0.3
>            Reporter: simon steiner
>
> pdf from PDFBOX-1365
>         PDDocument x = PDDocument.load(new File("out_PDFA.pdf"));
>         x.getPage(0).getCOSObject().toString();
>         x.close();



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