https://issues.apache.org/jira/browse/PDFBOX-6067
this code checks for weirdness in a specific file, you need the code
from PDFMergerUtilityTest:
void testSpecificFile() throws IOException
{
File file = new File("XXXXX/image2.pdf");
try (PDDocument doc = Loader.loadPDF(file))
{
PDStructureTreeRoot structureTreeRoot =
doc.getDocumentCatalog().getStructureTreeRoot();
if (structureTreeRoot != null &&
structureTreeRoot.getParentTree() != null)
{
checkWithNumberTree(doc);
checkForPageOrphans(doc);
checkForIDTreeOrphans(doc.getPages(), structureTreeRoot);
}
}
checkStructTreeRootCount(file);
}
Your file fails with
Element 0:3 from /ParentTree missing in /K ==> expected: <true> but
was: <false>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]