PDF files contain metadata that pdftk can easily extract using pdftk input.pdf dump_data output output.txt and update using pdftk input.pdf update_info input.txt output output.pdf

The metadata contains keys like 'Title', 'Author', 'CreationDate' and 'ModDate' but also the 'NumberOfPages'. For an example, see this post.

The 'Title' is often autogenerated by the 'Creator' application, be it Adobe Acrobat or Scribus, LibreOffice, some MS Word plugin or a PDF printer driver. It doesn't necessarily contain what the author wanted to be actually displayed in the PDF reader's title bar.

By providing an API (and partially a UI) for editing PDF files' actual metadata, we could:
allow fixing the template PDF's 'Title' and 'Author' values.
set the correct 'ModDate' whenever we're changing anything in the template.
set the correct 'CreationDate', a definable 'Title' and possibly more metadata whenever we're creating a PDF file from a populated template.

Let's figure it out!

Comments

Pancho created an issue.

wizonesolutions’s picture

First thought is: this will need to be a separate interface that only pdftk implements. Then we check for that and display the fields if supported.

It might be possible to allow combining pdftk with other backends, but that seems like it'd get messy, so pdftk-only is probably the starting point.