[
https://issues.apache.org/jira/browse/PDFBOX-5841?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17855694#comment-17855694
]
ASF subversion and git services commented on PDFBOX-5841:
---------------------------------------------------------
Commit 1918391 from [email protected] in branch 'pdfbox/branches/3.0'
[ https://svn.apache.org/r1918391 ]
PDFBOX-5841: copy COSObject instead of PDMetadata to avoid a malformed result
> First split result document misses metadata after split
> -------------------------------------------------------
>
> Key: PDFBOX-5841
> URL: https://issues.apache.org/jira/browse/PDFBOX-5841
> Project: PDFBox
> Issue Type: Bug
> Components: Writing
> Affects Versions: 3.0.3 PDFBox, 4.0.0
> Reporter: Tilman Hausherr
> Assignee: Andreas Lehmkühler
> Priority: Major
> Fix For: 3.0.3 PDFBox, 4.0.0
>
> Attachments: splitresult1.pdf, splitresult2.pdf
>
>
> This happens with the test file of PDFBOX-5840 and can also be reproduced
> with the command line utility: the first split result file doesn't have the
> metadata.
> Alternatively it can be reproduced programmatically by adding this code below
> {{assertEquals(5, pageTree.indexOf(pd5.getPage()));}} in
> {code:java}
> assertNotNull(dstDoc.getDocumentCatalog().getMetadata());
> ByteArrayOutputStream baos = new ByteArrayOutputStream();
> dstDoc.save(baos);
> PDDocument reloadedDoc = Loader.loadPDF(baos.toByteArray());
> assertNotNull(reloadedDoc.getDocumentCatalog().getMetadata());
> reloadedDoc.close();
> {code}
> I believe this is another writing problem, because the metadata exists, but
> gets lost during the first save, not during a second one (not part of the
> test code). It is expected to be object 116. It doesn't happen with 2.0.
> Attached: two saved files by splitting so that the entire file is the result.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]