Hi,<br><br> I made a small mistake in the last patch. Attached patches will compile now.<br><br> By considering valuable suggestions from all, I created 3 patches to get<br>
the ID from the PDF document.<br>
<br>
All patches do the same. But the implementation has different. I request<br>
all to give suggestions that which is the good way, and if there is any<br>
other better way<br>
please let me know.<br>
<br>
Explanation:<br>
<br>
patch1:<br>
Here I wrote getPermanentID() & getUpdateID() seperate functions.<br>
I called these from poppler-glib to get the entire ID and return the<br>
structure PopplerDocumentId.<br>
But here the repetetion of the code for getting "ID" object from<br>
trailer dictionary and check the conditions. To elimante that,<br>
<br>
pathc2:<br>
I wrote one more function getID(GooString *id, int index) in<br>
PDFDoc.cc, and calling this from getPermanentID() and getUpdateID(), by<br>
passing appropriate index.<br>
To eliminate this index thing,<br>
<br>
patch3:<br>
I declare one enum PDFID<br>
{<br>
permanentID,<br>
updateID<br>
}<br>
and remove getPermanentID() and getUpdateID() functions.<br>
Added getID(GooString *id, PDFID idType)<br>
<br>
Iam not at good in giving names to variable & functions. Please give me<br>
suggestions.<br>
<br>
Please let me know when you commit this patch. If any of the patch is<br>
considered from the above.<br><br>Thanks<br>--<br>A Srinivas<br>