I’m using libpoppler with the included qt bindings to edit forms in a PDF file.
// sample code
Poppler::Document* doc = Poppler::Document::load(filename);
Poppler::Page* page = doc->page(0);
QList<Poppler::FormField *> forms = page->formFields();
for(int j = 0; j < forms.length(); j++) {
Poppler::FormField * form = forms.at(j);
// fill it out or whatever...
...
But how can i save the changes made to a file? I know that poppler offers this possibility, eg for the Glib bindings: poppler_document_save(). How do I do this with the QT bindings? There’s no Poppler::Document::save() method or anything, what am I missing?
I found it out by myself after some digging in the Okular source: One has to use the
Poppler::PDFConverterclass. Below provided is a sample method: