[poppler] Get/Set PDF ID
Albert Astals Cid
aacid at kde.org
Fri Jun 18 13:24:46 PDT 2010
A Divendres, 18 de juny de 2010, Carlos Garcia Campos va escriure:
> Excerpts from srinivas adicherla's message of vie jun 18 13:17:39 +0200
> > Hi Carlos,
> > Yes, we can fix the bug. But I need a suggestion that for setting the
> > ID
> > which is the better way?
> > 1) One method is using my function PDFDoc::setID(). Here I just add the
> > ID
> > to the trailer dictionary, and saving it using Incremental Update. It
> > just adds few lines to the end of the pdf file containing the new
> > trailer dictionary.
> > 2) Second method is using PDFDoc::saveAs(). we need to pass the
> > writeForceRewrite mode to this function to add the ID to the document.
> > But the process is slow ( it has to rewrite the all objects in the pdf).
> > But still this rewriting is not working for all pdfs.
> > What i am thinking is let me add function setID(), and later i will fix
> > the bug in the saveAs() for saveCompleteRewrite mode.
> > Please give me suggestions.
> The thing is that I still don't see the point of allowing the user to
> set the ID, it should be set automatically when the document changes.
I'm with Carlos here, if the SaveAs methods should update the PDF ID and they
don't, let's fix that.
More information about the poppler