1

I processed a PDF file using Ghostscript:

gs -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -q -o output.pdf input.pdf

When I used a text/binary editor to look into the output PDF, I noticed that Ghostscript has added "Producer" metadata to the PDF. Ghostscript added /Producer(GPL Ghostscript 10.00.0) to the PDF information dictionary, and also added <rdf:Description rdf:about="" xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 10.00.0'/> to the XMP metadata. How do I stop Ghostscript from adding this metadata?

2
  • @ChrisDavies No, that does not answer my question. That question is about adding metadata to PDF files. This question is about stopping Ghostscript from automatically adding "Producer" metadata key and value, which none of the answers there is able to do.
    – Flux
    Jan 12 at 0:55
  • 1
    @ChrisDavies No, that does not answer the question because that method does not work. No matter what /Producer value I set, Ghostscript 10.00.0 always causes /Producer to be set to GPL Ghostscript 10.00.0 in the output PDF. What version of Ghostscript are you using?
    – Flux
    Jan 12 at 14:37

1 Answer 1

2

It seems that it is a deliberate choice for Ghostscript to not allow you to set the DOCINFO /Producer key anymore. See this commit. The Producer of the output really is the Ghostscript engine, and this information should be kept as-is to allow readers of the document who have problems with displaying it to be able to trace back to that software, for example a particular release of Ghostscript.

pdfwrite - don't honour /Producer key in DOCINFO pdfmark
author    Ken Sharp <[email protected]>   
Mon, 30 Sep 2019 13:40:35 +0100 (13:40 +0100)
Bug #701639 "pdfwrite should not honour the /Producer key in DOCINFO pdfmark"
The Producer in the document information dictionary (and XML Metadata)
is defined quite clearly as the application which produced the PDF file
from its native format.
...
This commit removes the ability for DOCINFO pdfmarks to alter the
Producer, 
...
permit the commercial version of Ghostscript to set the /Producer
from a pdfmark.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .