View Revisions: Issue #1029

Summary 0001029: Add PDF repair option for Web Print
Revision 2019-03-21 10:25 by rijkr
Description IST: Uploaded PDF files (Web Print) that have invalid format are rejected: an error message is shown to the user.
SOLL: When config item "print-in.repair.pdf.enable" = Y (default), then uploaded file is repaired as in issue 0001011 . When repair fails, the file will eventually be rejected.
Revision 2019-01-29 17:07 by rijkr
Description IST: Uploaded PDF files (Web Print) that have invalid format are rejected: an error message is shown to the user.
SOLL: When config item "print-in.repair.pdf.enable" = Y (default), then uploaded file is repaired with Ghostscript prepress command, as in issue 0001011 . When repair fails, the file will eventually be rejected. This is example output from a repair action:
$ gs -o Repaired.pdf -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress Invalid.pdf 
GPL Ghostscript 9.26 (2018-11-20)
Copyright (C) 2018 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
   **** Warning: considering '0000000000 XXXXX n' as a free entry.
   **** Warning: considering '0000000000 XXXXX n' as a free entry.
Processing pages 1 through 6.
Page 1
Page 2
Page 3
Page 4
Page 5
Page 6

   **** This file had errors that were repaired or ignored.
   **** The file was produced by: 
   **** >>>> macOS Version 10.14.2 (Build 18C54) Quartz PDFContext <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.
See Bruno Lowagie's explanation on why some PDFs are broken beyond repair at https://stackoverflow.com/questions/51156624/loading-pdf-into-pdfreader-causes-invalidpdfexception-rebuild-failed-is-not