We are using PDFSharp 6.1.0-preview-1 on Docker with alphine linux, we create a pdf by combining a few existing pdf files , then use ghostscript to further compress the pdf files, when we upgraded we seem to be getting an error even though the pdf is compressed and created... Attached is a Sample PDF created on windows using PDFSharp, and another though word and saved as PDF, and the command we are using in docker (linux) to compress this file is:
gs -o "compressed.pdf" -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dEmbedAllFonts=false -dSubsetFonts=true -f "Sample.pdf"
The error we get when trying to compress the PDFSharp PDF is:
/tmp $ gs -o "compressed.pdf" -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dEmbedAllFonts=false -dSubsetFonts=true -f "Sample.pdf" GPL Ghostscript 10.02.0 (2023-09-13) Copyright (C) 2023 Artifex Software, Inc. All rights reserved. This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY: see the file COPYING for details. Processing pages 1 through 8. Page 1 warning: ignoring zlib error: incorrect data check Page 2 warning: ignoring zlib error: incorrect data check Page 3 warning: ignoring zlib error: incorrect data check Page 4 warning: ignoring zlib error: incorrect data check Page 5 warning: ignoring zlib error: incorrect data check Page 6 warning: ignoring zlib error: incorrect data check Page 7 warning: ignoring zlib error: incorrect data check Page 8 warning: ignoring zlib error: incorrect data check
When we run the other pdf file through this conversion it works:
/tmp $ gs -o "compressed.pdf" -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -f "Sample_Other.pdf" GPL Ghostscript 10.02.0 (2023-09-13) Copyright (C) 2023 Artifex Software, Inc. All rights reserved. This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY: see the file COPYING for details. Processing pages 1 through 4. Page 1 Page 2 Page 3 Page 4
Just wanted to find out if this could be anything within the created pdf structure that is causing this?
|