[poppler] Annotations with qt

Jaydeep Solanki jaydp17 at gmail.com
Sun Dec 30 09:45:10 PST 2012


Hi,
I'm trying to annotate a pdf file, but everytime I annotate a pdf, it get's
corrupted (Okular says it cannot open it).

Please point out what am I doing wrong,
here's my code...

TextAnnotation *ta = new TextAnnotation(TextAnnotation::InPlace);
ta->setInplaceText("Inplace");
pDoc->page(currentPage)->addAnnotation(ta);
Poppler::PDFConverter *conv = pDoc->pdfConverter();
conv->setOutputFileName(this->currentFileName());
conv->setPDFOptions(conv->pdfOptions() |
Poppler::PDFConverter::WithChanges);
conv->convert();


I execute this & when I reload the document, it fails to load.

*If you want specific error msg:*

"Error: May not be a PDF file (continuing anyway)"

"Error: Couldn't find trailer dictionary"

"Error: Invalid XRef entry"

"Error: Couldn't find trailer dictionary"

"Error: Catalog object is wrong type (null)"

"Error: Couldn't find trailer dictionary"

"Error: Couldn't find trailer dictionary"

"Error: Catalog object is wrong type (null)"

"Error: Couldn't read page catalog"


-Jaydeep
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20121230/189a948f/attachment.html>


More information about the poppler mailing list