[cairo] pdf metadata
Adrian Johnson
ajohnson at redneon.com
Thu Aug 5 11:39:21 UTC 2021
On 5/8/21 5:17 pm, Knut Petersen wrote:
> 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?
>
> Knut
>
Should be easy enough to do. I would call it
cairo_pdf_surface_set_custom_metadata () as Adobe Reader lists the
nonstandard metadata under the "Custom" tab of Document Properties.
More information about the cairo
mailing list