asciidoctor / asciidoctor-pdf

:page_with_curl: Asciidoctor PDF: A native PDF converter for AsciiDoc based on Asciidoctor and Prawn, written entirely in Ruby.
https://docs.asciidoctor.org/pdf-converter/latest/
MIT License
1.14k stars 500 forks source link

Producer set to Author instead of producing software in document properties #2510

Closed Vampire closed 4 months ago

Vampire commented 6 months ago

If you generate a document without author line, the document properties of the generated PDF show: image In English the field is called "PDF Producer" which is more ambiguous in what it could mean than the german "PDF created with" literally translated.

This is imho the correct thing to have in this field, which is also backed by the example at the end of section 14.3.3 in https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf which shows: image

But if you set an author line on the document, that line is used as Producer: image

In English where the field is just called "Producer" both values could fit, though it is a bit inconsistent. But the example in the standard and the localization of Acrobat Reader suggest that the author should not be put there.

mojavelinux commented 4 months ago

Here are the definitions of these fields according to the PDF specification:

It would seem as though the Creator is for whatever product created the AsciiDoc (if relevant) and the Producer is for whatever product generated/produced the PDF (in this case Asciidoctor PDF + Prawn).

I would agree that Producer should be the Asciidoctor PDF credit.

Note that the Producer field can be overridden using the publisher attribute, which was requested/required by one of the users of Asciidoctor PDF long ago. (I think I'll add producer as a fallback just for completeness).

For Creator, I'm not sure. I think perhaps we should default that field to the author, but still allow it to be overridden using the creator attribute.

mojavelinux commented 4 months ago

Here's what I'm thinking. /Producer can be overridden using the producer attribute, but will default to the Asciidoctor PDF credit line. /Creator can be overridden using the publisher attribute, but will default to the author. (Here I'm remapping the publisher attribute to /Creator instead of /Producer per the description in the PDF specification).

(We always have to populate both fields or Prawn will fill them in with the text "Prawn").

mojavelinux commented 4 months ago

/Creator can be overridden using the publisher attribute

I sure wish there was a /Publisher field, but there just isn't (and most PDF readers don't show custom fields). So publisher → /Creator just has to mean what the author wants it to mean. What's important is that now you'll have control over both fields, which is the key focus here in my mind.