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