[cairo] [PATCH/RFC] Modifying PDF document information dictionary
Eugeniy Meshcheryakov
eugen at debian.org
Thu Jun 28 14:08:52 PDT 2007
Hello,
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.
Regards,
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_AUTHOR,
> CAIRO_PDF_INFO_SUBJECT,
> CAIRO_PDF_INFO_KEYWORDS,
> CAIRO_PDF_INFO_CREATOR,
> CAIRO_PDF_INFO_PRODUCER,
> CAIRO_PDF_INFO_CREATION_DATE,
> CAIRO_PDF_INFO_MOD_DATE,
> } 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