[poppler] Patch to Get PDF ID

Albert Astals Cid aacid at kde.org
Thu Jul 15 06:34:21 PDT 2010


A Divendres, 9 de juliol de 2010, srinivas adicherla va escriure:
> 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.
> 

Your patch does not compile

In file included from /home/tsdgeos/devel/poppler-0.14/glib/poppler.h:127,                                                                                                                      
                 from /home/tsdgeos/devel/poppler-0.14/glib/poppler-
action.cc:19:
/home/tsdgeos/devel/poppler-0.14/glib/poppler-document.h:96: error: 
‘DOCUMENT_ID_LENGTH’ was not declared in this scope
/home/tsdgeos/devel/poppler-0.14/glib/poppler-document.h:97: error: 
‘DOCUMENT_ID_LENGTH’ was not declared in this scope
make[2]: *** [glib/CMakeFiles/poppler-glib.dir/poppler-action.cc.o] Error 1
make[1]: *** [glib/CMakeFiles/poppler-glib.dir/all] Error 2
make: *** [all] Error 2

Albert

> Thanks
> --
> A Srinivas


More information about the poppler mailing list