[poppler] Patch to Get/Set PDF ID in the trailer dictionary, get page labels .

Carlos Garcia Campos carlosgc at gnome.org
Fri Jun 11 03:31:47 PDT 2010

Excerpts from srinivas adicherla's message of jue jun 10 12:13:25 +0200 2010:
> Hi,

Hi srinivas, 

>   This Patch does the following:

Thanks for the patch, I some comments:

>   1) gets and set the pdf IDs in the trailer dictionary.

The code to get ID could be moved to the core, so that it can be used
by other frontends, someting like PDFDoc::getID(). In the glib
frontend, instead of returning an array we could use a struct so that
we can also give names to the fields, since the first id is the
permanent id and the second one is the id that changes when the
document is updated. Something like

typedef struct _PopplerDocumentId {
        gchar permanent_id[32];
	gchar update_id[32];
} PopplerDocumentId;

The method generate_and_set_id() shouldn't be necessary since
PDFDoc::saveAS() already generates a new id. 

>   2) get all page labels & get page labels by index.

We already have labels in the glib frontend, it's property of
PopplerPage that can be obtained with

g_object_get (page, "label", &label, NULL);

I don't think we need that API in PopplerDocument, but we should
probably expose it in the PopplerPage API to make it easier to

>    Kindly let me know if You commit this patch.
> Thanks
> A Srinivas
Carlos Garcia Campos
PGP key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x523E6462
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20100611/3ab6035b/attachment.pgp>

More information about the poppler mailing list