PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Apr 27, 2024 3:54 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Thu Jan 04, 2024 2:39 pm 
Offline

Joined: Thu Jan 04, 2024 12:03 pm
Posts: 2
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?


Attachments:
Sample_PDF.zip [148.38 KiB]
Downloaded 553 times
Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 09, 2024 8:46 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3096
Location: Cologne, Germany
So GS emits a warning and I don't know if there really is an issue behind that warning.
Difficult to start searching anyway.

One question: If you open that sample.pdf with Adobe Reader, and then use "File" => "Save as" to save it under a different name, and then process that file with GS, will you still get the same warnings?

If yes, then Adobe Reader sees no issue and then the GS warnings can probably be ignored.
If no, then maybe we should look after it.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 169 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group