'PDF digital signature not working in Ghostscript while compression

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dDownsampleColorImages=true -dPrinted=true -dColorImageResolution=100 -dNOPAUSE -dBATCH -sOutputFile=output.pdf input.pdf



Solution 1:[1]

Ghostscript does not produce signed PDF files, so you can't be signing the file with Ghostscript.

If you mean that the output PDF file is not signed, then yes, correct, Ghostscript does not sign files.

The process for producing PDF files from Ghostscript is documented here

Given that the point of signing a file is that it proves the file has not been modified, how do you think you can produce a 'compressed' file while maintaining the signature ? For example, the command line you have supplied there specifically downsamples the resolution of colour images, which clearly modifies the file.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 KenS