[poppler] Patch to Get PDF ID

srinivas adicherla srinivas.adicherla at gmail.com
Fri Jul 9 04:25:05 PDT 2010


Hi,

  By considering valuable suggestions from all, I created 3 patches to get
the ID from the PDF document.

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
please let  me know.

Explanation:

patch1:
         Here I wrote getPermanentID() & getUpdateID() seperate functions.
I called these from poppler-glib to get the entire ID and return the
structure PopplerDocumentId.
         But here the repetetion of the code for getting "ID" object from
trailer dictionary and check the conditions. To elimante that,

pathc2:
         I wrote one more function getID(GooString *id, int index) in
PDFDoc.cc, and calling this from getPermanentID() and getUpdateID(), by
passing appropriate index.
         To eliminate this index thing,

patch3:
         I declare one enum PDFID
                             {
                                  permanentID,
                                  updateID
                             }
               and remove getPermanentID() and getUpdateID() functions.
Added getID(GooString *id, PDFID idType)

Iam not at good in giving names to variable & functions. Please give me
suggestions.

Please let me know when you commit this patch. If any of the patch is
considered from the above.

Thanks
--
A Srinivas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20100709/5bc64d5e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: srinivas_poppler1.patch
Type: text/x-patch
Size: 8781 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20100709/5bc64d5e/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: srinivas_poppler2.patch
Type: text/x-patch
Size: 8294 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20100709/5bc64d5e/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: srinivas_poppler3.patch
Type: text/x-patch
Size: 8428 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20100709/5bc64d5e/attachment-0005.bin>


More information about the poppler mailing list