[cairo] pdf metadata

Knut Petersen knupero at gmail.com
Thu Aug 5 07:47:56 UTC 2021

Hi everybody!

Lilypond creates PDFs with the following metadata keys mentioned in Adobe's PDF Reference: Creator, Title, Subject, Keywords, ModDate, Author.

In addition, we use other self-defined metadata keys: Subtitle, Composer, Arranger, Poet, Copyright. This does not contradict the PDF specification, because at the end of the first paragraph on page 550 of https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf it reads:

    "New keys should be chosen with care so that they make sense to users."

  Keys not mentioned in the standard are therefore considered explicitly allowed, and it is no problem to use them in PDF documents created with Ghostscript from PS.

Cairo unfortunately does not provide a way to use metadata keys other than those mentioned in the specification, but after a look at the Cairo source code a patch seems trivial if it is just to support a few additional keys by defining some more members of cairo_pdf_metadata_t plus some related code 
to handle those new keys.

The alternative would be a patch that allows the use of arbitrary keys. This could be done. in a new function named e.g. cairo_pdf_surface_set_nonstandard_metadata ().

What is the opinion of the Cairo community?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo/attachments/20210805/f0d0b467/attachment.htm>

More information about the cairo mailing list