[
https://issues.apache.org/jira/browse/PDFBOX-5489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17606303#comment-17606303
]
Tilman Hausherr commented on PDFBOX-5489:
-----------------------------------------
I tried this with the file of PDFBOX-4149 (and noticed I can't pass a document):
{code}
PDDocument doc = Loader.loadPDF(new File("PDFBOX-4149-veryslow.pdf"));
List<COSObjectKey> indirectObjectKeys = new ArrayList<>();
long t0 = System.currentTimeMillis();
doc.getDocumentCatalog().getCOSObject().getIndirectObjectKeys(indirectObjectKeys);
long highestImportedNumber =
indirectObjectKeys.stream().map(COSObjectKey::getNumber).max(Long::compare).get();
System.out.println(indirectObjectKeys.size());
long t1 = System.currentTimeMillis();
System.out.println("highestImportedNumber: " + highestImportedNumber);
System.out.println((t1-t0)/1000f);
{code}
The output is:
2
highestImportedNumber: 3
0.038
This is suspiciously low... looking at the code of {{getIndirectObjectKeys}},
now I see you don't go through arrays.
> Split result page missing dictionary after split
> ------------------------------------------------
>
> Key: PDFBOX-5489
> URL: https://issues.apache.org/jira/browse/PDFBOX-5489
> Project: PDFBox
> Issue Type: Bug
> Components: Writing
> Affects Versions: 3.0.0 PDFBox
> Reporter: Tilman Hausherr
> Assignee: Andreas Lehmkühler
> Priority: Major
> Fix For: 3.0.0 PDFBox
>
> Attachments: PDFBOX-5489-p2.pdf
>
>
> Splitting the file from PDFBOX-5488 brings up a useless page 2, parts of a
> dictionary is missing. (tested with the command line application)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]