[cairo] [PATCH/RFC] Modifying PDF document information dictionary

Eugeniy Meshcheryakov eugen at debian.org
Thu Jun 28 14:08:52 PDT 2007


I sent this some time ago but got no reply. So let's try again. Modified
patch that applies to current git tree is attached. If there are
problems with current patch, please let me know. If there are other
ideas on how to modify PDF metadata from cairo, please let me know too.

Eugeniy Meshcheryakov

11 квітня 2007 о 00:38 +0200 Eugeniy Meshcheryakov написав(-ла):
> Current cairo writes fixed content into PDF Info dictionary, that
> contains Creator and Producer fields containing cairo version. For some
> applications it may be useful to fill other available fields. Attached
> patch modifies cairo to allow this. It adds one an enum and one public
> function for this:
>   typedef enum _cairo_pdf_info_field {
>         CAIRO_PDF_INFO_TITLE = 0,
>   } cairo_pdf_info_field_t;
>   cairo_public cairo_status_t
>   cairo_pdf_surface_set_info (cairo_surface_t             *surface,
>                               cairo_pdf_info_field_t      field,
>                               const char                  *value);
> This function allows setting of all fields except "Trapped". I do not
> know what it is for and it has type "name" unlike other fields. If anyone
> thinks that it can be useful, another function can be added.
> Setting "value" to NULL resets field content. With this function it is
> not posible to use NULs in value. It can be fixed by adding length as
> parameter, but I do not know if it is useful.
> Are there any comments? Can something like this be accepted for cairo?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cairo-pdf-info.diff
Type: text/x-diff
Size: 5766 bytes
Desc: not available
Url : http://cairographics.org/archives/cairo/attachments/20070628/179db21f/attachment-0001.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://cairographics.org/archives/cairo/attachments/20070628/179db21f/attachment-0001.pgp 

More information about the cairo mailing list