Hi,<br><br><div style="margin-left: 40px;">By considering the suggestions from Carlos & Pino Toscano, I made some changes to the previous patch.<br></div><br> As Carlos mentioned, I added PDFDoc:getID() in the core and from the glib bindings took the structure for PopplerDocumentId and returning it. <br>
In addition to that I added two new properties in the PopplerDocument namely, "permanent-id" , "update-id".<br><br> As Carlos mentioned PDFDoc::saveAs() will not generate ID unless we modify and save the file. If we don't modify and save it, it is nothing but save a copy.So, I added PDFDoc::setID() in the core.<br>
<br>Please find two attachments with this mail containing the above said changes.<br><br><br> <br><br><div class="gmail_quote">On Sat, Jun 12, 2010 at 12:30 AM, <span dir="ltr"><<a href="mailto:poppler-request@lists.freedesktop.org">poppler-request@lists.freedesktop.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Send poppler mailing list submissions to<br>
<a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="http://lists.freedesktop.org/mailman/listinfo/poppler" target="_blank">http://lists.freedesktop.org/mailman/listinfo/poppler</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:poppler-request@lists.freedesktop.org">poppler-request@lists.freedesktop.org</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:poppler-owner@lists.freedesktop.org">poppler-owner@lists.freedesktop.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of poppler digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Re: Patch to Get/Set PDF ID in the trailer dictionary, get<br>
page labels . (Carlos Garcia Campos)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Fri, 11 Jun 2010 12:31:47 +0200<br>
From: Carlos Garcia Campos <<a href="mailto:carlosgc@gnome.org">carlosgc@gnome.org</a>><br>
Subject: Re: [poppler] Patch to Get/Set PDF ID in the trailer<br>
dictionary, get page labels .<br>
To: srinivas adicherla <<a href="mailto:srinivas.adicherla@gmail.com">srinivas.adicherla@gmail.com</a>><br>
Cc: poppler <<a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a>><br>
Message-ID: <1276251137-sup-4795@charmaleon><br>
Content-Type: text/plain; charset="utf8"<br>
<br>
Excerpts from srinivas adicherla's message of jue jun 10 12:13:25 +0200 2010:<br>
> Hi,<br>
<br>
Hi srinivas,<br>
<br>
> This Patch does the following:<br>
<br>
Thanks for the patch, I some comments:<br>
<br>
> 1) gets and set the pdf IDs in the trailer dictionary.<br>
<br>
The code to get ID could be moved to the core, so that it can be used<br>
by other frontends, someting like PDFDoc::getID(). In the glib<br>
frontend, instead of returning an array we could use a struct so that<br>
we can also give names to the fields, since the first id is the<br>
permanent id and the second one is the id that changes when the<br>
document is updated. Something like<br>
<br>
typedef struct _PopplerDocumentId {<br>
gchar permanent_id[32];<br>
gchar update_id[32];<br>
} PopplerDocumentId;<br>
<br>
The method generate_and_set_id() shouldn't be necessary since<br>
PDFDoc::saveAS() already generates a new id.<br>
<br>
> 2) get all page labels & get page labels by index.<br>
<br>
We already have labels in the glib frontend, it's property of<br>
PopplerPage that can be obtained with<br>
<br>
g_object_get (page, "label", &label, NULL);<br>
<br>
I don't think we need that API in PopplerDocument, but we should<br>
probably expose it in the PopplerPage API to make it easier to<br>
find.<br>
<br>
> Kindly let me know if You commit this patch.<br>
><br>
><br>
> Thanks<br>
> A Srinivas<br>
--<br>
Carlos Garcia Campos<br>
PGP key: <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x523E6462" target="_blank">http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x523E6462</a><br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: signature.asc<br>
Type: application/pgp-signature<br>
Size: 198 bytes<br>
Desc: not available<br>
URL: <<a href="http://lists.freedesktop.org/archives/poppler/attachments/20100611/3ab6035b/attachment-0001.pgp" target="_blank">http://lists.freedesktop.org/archives/poppler/attachments/20100611/3ab6035b/attachment-0001.pgp</a>><br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
poppler mailing list<br>
<a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/poppler" target="_blank">http://lists.freedesktop.org/mailman/listinfo/poppler</a><br>
<br>
<br>
End of poppler Digest, Vol 64, Issue 9<br>
**************************************<br>
</blockquote></div><br>