[
https://issues.apache.org/jira/browse/PDFBOX-5170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17363144#comment-17363144
]
Tilman Hausherr commented on PDFBOX-5170:
-----------------------------------------
There is a problem with the page structure in an old test I haven't committed
(I will later) and also in an existing test, but that isn't detected. To detect
it, add this code in {{TestCreateSignature.checkSignature()}} in the beginning
of the block where the signed file is read {{Loader.loadPDF(signedFile))}}.
{code}
// early detection of problems in the page structure
int p = 0;
PDPageTree pageTree = document.getPages();
for (PDPage page : document.getPages())
{
assertEquals(p, pageTree.indexOf(page));
++p;
}
{code}
This will show a failure of {{testPDFBox3978}} after r1890748. However this
happens only if TestCreateSignature runs alone, not if the build tests are done
(see also PDFBOX-5214).
> Compression creates issue with Page structure
> ---------------------------------------------
>
> Key: PDFBOX-5170
> URL: https://issues.apache.org/jira/browse/PDFBOX-5170
> Project: PDFBox
> Issue Type: Bug
> Components: Writing
> Affects Versions: 3.0.0 PDFBox
> Reporter: Daniel Persson
> Assignee: Andreas Lehmkühler
> Priority: Minor
> Fix For: 3.0.0 PDFBox
>
>
>
> Hi Team.
>
> PDFBox version 3.0.0-RC1
> pdftoppm version 21.04.0
> mupdf-gl version 1.18.0
>
> This might be an unusual issue but might needs to be checked. The simple code
> below creates a PDF that can't be viewed with Poppler because of "error:
> malformed page tree"
> {code:java}
> PDDocument testPdf = Loader.loadPDF(new File("input.pdf"));
> testPdf.save(new File("output.pdf"));
> testPdf.close();
> PDDocument testPdf2 = Loader.loadPDF(new File("input.pdf"));
> testPdf2.save(new File("output2.pdf"), CompressParameters.NO_COMPRESSION);
> testPdf2.close();
> {code}
> This is not a content issue because all PDFs from the same producer have the
> same problem, I've just picked an example.
> Best regards
> Daniel
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]