Tilman Hausherr created PDFBOX-5841: ---------------------------------------
Summary: 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 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: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org