[poppler] Annotations with qt

Jaydeep Solanki jaydp17 at gmail.com
Sun Dec 30 10:05:22 PST 2012


here's the source
https://www.dropbox.com/s/o22eatlg69yj7ql/annot.tar.gz


On Sun, Dec 30, 2012 at 11:15 PM, Jaydeep Solanki <jaydp17 at gmail.com> wrote:

> 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/6e92536c/attachment.html>


More information about the poppler mailing list