[poppler] Patch to Get PDF ID

srinivas adicherla srinivas.adicherla at gmail.com
Thu Jul 15 21:47:20 PDT 2010


Hi,

      I made a small mistake in the last patch. Attached patches will
compile now.

   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/20100716/8745a36f/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: srinivas_poppler1.patch
Type: text/x-patch
Size: 8771 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20100716/8745a36f/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: srinivas_poppler2.patch
Type: text/x-patch
Size: 8284 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20100716/8745a36f/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: srinivas_poppler3.patch
Type: text/x-patch
Size: 8418 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20100716/8745a36f/attachment-0005.bin>


More information about the poppler mailing list