-
Notifications
You must be signed in to change notification settings - Fork 50
PDFio-based pdftopdf filter bugs #113
Description
Hey @tillkamppeter, @uddhavphatak, @michaelrsweet
I've compiled the latest libcupsfilters and tested pdftopdf on several PDF files, just a small compatibility and performance test.
I found several bugs while testing.
Tested on:
PDF was processed with:
PPD=LBP1120CAPTPPD.ppd FINAL_CONTENT_TYPE=application/vnd.cups-raster \
pdftopdf 1 1 1 1 'PageSize=A4 fitplot' "$file" > "output/${file_noext}_new.pdf"
And then converted to JPEG with:
gs -dQUIET -dBATCH -dSAFER -dNOPAUSE -sDEVICE=jpeg -sOutputFile="output/${file_noext}%03d.jpg" -sstdout=%stderr -sPageList=1 -r300 -dDEVICEWIDTHPOINTS=595 -dDEVICEHEIGHTPOINTS=842 -f "$file"
Test 1
File: 4 - Transparency PDF test - Designer.pdf
Result: incorrect transparency handling: the gradient is more transparent, bottom square blending (on the shoulder) is incorrect.
Test 2
File: TransparencyTest.pdf
Result: incorrect transparency handling: the gradient is more transparent (less blue).
Test 3
File: Niere2025a.pdf
Result: crash, output file not created.
…
Key 'N' not found.
ERROR: missing required flags
WARNING: Appearance stream is missing required /BBox.
DEBUG: special case ignore annotation with no appearance
DEBUG: Opening field stream 16/16... with obj number 275
Key 'N' not found.
ERROR: missing required flags
WARNING: Appearance stream is missing required /BBox.
DEBUG: special case ignore annotation with no appearance
DEBUG: Opening content stream 1/3...
DEBUG: Opened stream 1, resmap[3]=(nil)
DEBUG: Opening content stream 2/3...
DEBUG: Opened stream 2, resmap[3]=(nil)
DEBUG: Opening content stream 3/3...
DEBUG: Opened stream 3, resmap[3]=(nil)
DEBUG: page_dict_cb(dict=0xe48d60, key="Font", outpage=0xe9b660), type=5
DEBUG: page_dict_cb(dict=0xe48d60, key="ProcSet", outpage=0xe9b660), type=1
DEBUG: page_dict_cb(dict=0xe48d60, key="XObject", outpage=0xe9b660), type=5
DEBUG: ppdFilterEmitJCL: Filter function (PID 882055) exited with no errors.
ERROR: pdftopdf filter function failed.
Test 4
File: Wendzel2025a.pdf
Result: crash, output file not created.
…
Key 'N' not found.
ERROR: missing required flags
WARNING: Appearance stream is missing required /BBox.
…
DEBUG: page_dict_cb(dict=0x21187c10, key="ProcSet", outpage=0x210965f0), type=1
DEBUG: page_dict_cb(dict=0x21187c10, key="XObject", outpage=0x210965f0), type=5
DEBUG: Opening content stream 1/1...
DEBUG: Opened stream 1, resmap[7]=(nil)
DEBUG: page_dict_cb(dict=0x21196f50, key="ColorSpace", outpage=0x210965f0), type=6
DEBUG: page_dict_cb: objval=0x2104a620(615), arrayval=(nil), dictval=0x21099860
DEBUG: page_dict_cb(dict=0x21196f50, key="ExtGState", outpage=0x210965f0), type=6
DEBUG: page_dict_cb: objval=0x2104a540(613), arrayval=(nil), dictval=0x2109a110
DEBUG: page_dict_cb(dict=0x21196f50, key="Pattern", outpage=0x210965f0), type=6
DEBUG: page_dict_cb: objval=0x2104a5b0(614), arrayval=(nil), dictval=0x210a2500
DEBUG: page_dict_cb(dict=0x21196f50, key="ProcSet", outpage=0x210965f0), type=1
DEBUG: page_dict_cb(dict=0x21196f50, key="XObject", outpage=0x210965f0), type=5
DEBUG: ppdFilterEmitJCL: Filter function (PID 882198) exited with no errors.
ERROR: pdftopdf filter function failed.
Test 5
File: Tai2025a.pdf
Result: entire document is missing pictures.


