View Revisions: Issue #1011

Summary 0001011: Add PDF repair option for proxy printing
Revision 2018-12-18 20:57 by rijkr
Additional Information
Revision 2018-12-18 21:02 by rijkr
Additional Information Use `pdf2ps` to check if PDF is corrupted. If corrupted, error messages will show on stdout. E.g.
**** Error reading a content stream. The page may be incomplete.
               Output may be incorrect.
Revision 2018-12-18 20:57 by rijkr
Description IST: Uploaded PDF files (Web Print) might not have valid PDF format. These files don't get noticed, since they are shown correctly as SafePages. However, when these corrupted PDFs are proxy printed, CUPS filtering might deliver incorrect PDL (PostScript) so printed output will not be as expected (in some cases we saw just a blank page is printed).
SOLL: Add configuration item to enable/disable repair of any PDF just before sending it to CUPS: "proxy-print.repair.enable" Y | N (default).
Revision 2018-12-19 13:55 by rijkr
Description IST: Uploaded PDF files (Web Print) might not have valid PDF format. These files don't get noticed, since they are shown correctly as SafePages. However, when these corrupted PDFs are proxy printed, CUPS filtering might deliver incorrect PDL (PostScript) so printed output will not be as expected (in some cases we saw just a blank page is printed).
SOLL: Add configuration item to enable/disable repair of any PDF just before sending it to CUPS: "proxy-print.repair.enable" Y | N (default). The repair is done with:
gs -o repaired.pdf -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress corrupted.pdf
The repair does take a few seconds, even for larger PDF files. https://superuser.com/questions/278562/how-can-i-fix-repair-a-corrupted-pdf-file : pdftocairo is also an option that works, but is not used for now:
pdftocairo -pdf print.pdf print_repaired.pdf
Revision 2018-12-19 13:56 by rijkr
Additional Information Use `pdf2ps` on command line to check if PDF is corrupted. If corrupted, error messages will show on stdout. E.g.
**** Error reading a content stream. The page may be incomplete.
               Output may be incorrect.
Revision 2018-12-18 20:57 by rijkr
Steps To Reproduce
Revision 2018-12-28 15:32 by rijkr
Steps To Reproduce Reported by user: Corrupted PDF files were delivered by either Canon imageFORMULA p-150 or Canon imageFORMULA DR-2010M Document scanner.
Revision 2019-01-07 20:12 by rijkr
Steps To Reproduce
Revision 2019-02-27 10:30 by rijkr
Description IST: Uploaded PDF files (Web Print) might not have valid PDF format. These files don't get noticed, since they are shown correctly as SafePages. However, when these corrupted PDFs are proxy printed, CUPS filtering might deliver incorrect PDL (PostScript) so printed output will not be as expected (in some cases we saw just a blank page is printed).
SOLL: Add configuration item to enable/disable repair of any PDF just before sending it to CUPS: "proxy-print.repair.enable" Y | N (default). The repair is done with:
pdftocairo -pdf print.pdf print_repaired.pdf
. The repair does take a few seconds, even for larger PDF files. https://superuser.com/questions/278562/how-can-i-fix-repair-a-corrupted-pdf-file : Ghostscript prepress is also an option, but we found out that it does not repair in all cases:
gs -o repaired.pdf -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress corrupted.pdf
Revision 2019-02-27 10:31 by rijkr
Description IST: Uploaded PDF files (Web Print) might not have valid PDF format. These files don't get noticed, since they are shown correctly as SafePages. However, when these corrupted PDFs are proxy printed, CUPS filtering might deliver incorrect PDL (PostScript) so printed output will not be as expected (in some cases we saw just a blank page is printed).
SOLL: Add configuration item to enable/disable repair of any PDF just before sending it to CUPS: "proxy-print.repair.enable" Y | N (default). The repair is done with:
pdftocairo -pdf print.pdf print_repaired.pdf
The repair action only takes a few seconds, even for larger PDF files. https://superuser.com/questions/278562/how-can-i-fix-repair-a-corrupted-pdf-file : Ghostscript prepress is an alternative, but we found out that it does not repair in all cases:
gs -o repaired.pdf -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress corrupted.pdf