Fix to PDFio-based pdftopdf filter bugs#124
Fix to PDFio-based pdftopdf filter bugs#124uddhavphatak wants to merge 4 commits intoOpenPrinting:masterfrom
Conversation
| } | ||
|
|
||
| if (p.has_form || p.has_annotations) | ||
| if (p.has_form && p.has_annotations) |
There was a problem hiding this comment.
I do not really understand this change. For me it looks wrong, as we need flattening when there is a form and we need also flattening when there are annotations. We do not only need flattening when there is BOTH a form AND annotations.
Did you also test whether the filter behaves correctly with a PDF which ONLY contains a (filled) form or ONLY contains annotations? Does filled in text or annotations get printed?
Why does this change make the images in the test file being shown?
There was a problem hiding this comment.
I tested the files in the testing suite, and they have passed.
But I will test through more files as you have told, specifically with the pdf which only contains a (filled) form or only annotations.
Yes, this change does make the images in the test files being shown.
|
The commit "fill the PDF file with annotations for proper tests" is a change on a binary file. How did you do the change? To fulfill the requirements of open source this needs to be documented or, even better, a script being provided with applies the changes to the original file. |
|
The pdf file didn't have the fields filled, thus I filled those , and saved it; overwriting the pdf binary |
How did you exactly fill them, with which software? Is there a non-interactive way to fill the forms, for example with PDFio? You could perhaps compare the PDF files with empty form, and with differently filled fields, to find out what gets added to the original PDF when filling the form. |
|
I filled the form using the ubuntu default (Evince). there is a way to fill the forms using PDFio by writing a C program which will rewrite the Full PDF with the filled details. |
Could you create such C program which generates the PDF with filled form? This way we can have more well-definbed test files, and also an easier way to control what binary test files contains (remember the "xz" attack). |
Fixes #113 ,
Test 1 and Test 2 (No Change in libcupsfilters)
File 1: 4 - Transparency PDF test - Designer.pdf
File 2: TransparencyTest.pdf
Issue: Bug in Ghostscript (https://bugs.ghostscript.com/show_bug.cgi?id=709017)
Fix : https://cgit.ghostscript.com/cgi-bin/cgit.cgi/ghostpdl.git/commit/?id=d4ac828eba87f53077339dd5acd6f8f022bad745
Test 3 and Test 4 (Updated the dependency of libcupsfilters to PDFio1.6.2)
File 3: Niere2025a.pdf
File 4: Wendzel2025a.pdf
Issue : michaelrsweet/pdfio#146
Fix : Updated the dependency of libcupsfilters to PDFio 1.6.2
Test 5 (changed the Operator from || to &&)
File: Tai2025a.pdf
Issue: entire document is missing pictures.
Fix : libcupsfilters implementation used "if (p.has_form || p.has_annotations)" which was wrong, for flattening the operator to be used should be "&&", which has been changed