GNOME Bugzilla – Bug 480668
save user input in pdf fillable forms
Last modified: 2010-03-17 07:21:48 UTC
It would excellent if the user input fields on fillable pdf forms could be saved someway. Ideally (not knowing anything about how difficult this might be), this data would simply be saved into the pdf file when 'save a copy' was selected. If that's not possible, perhaps there could be a menu option to 'Save filled data' to a separate file that contained a pointer to the pdf file and the input data?
Saving filled data to pdf file is not supported by poppler yet. When it is supported will have to think how to expose it in the evince UI. Maybe we can just use the current save a copy action. Thanks for reporting.
The save a copy action is indeed the Right Way™. You’d most likely want a simple toggle, visible only when necessary, to choose whether the copy should be pristine or include the current user data. To the OP, note that printing to a PDF or PS is almost the same as saving a flattened copy.
It seems that whoever wrote the release notes for GNOME 2.20: http://www.gnome.org/start/2.20/notes/en/index.html#rnusers-evince oversold the current capabilities of evince, because it implies that saving user input back to the PDF file is already implemented: "GNOME's Evince viewer, for PDF and Postscript files now supports interactive PDF forms, allowing you to enter information into a PDF that you receive, to save or print." Clearly "save" is wrong in this context. It probably wasn't an evince developer who wrote that, but maybe contact the release notes writers to change that otherwise users are going to be disappointed that the advertised feature is not actually there yet (I know I was... ;-))
This is already supported by poppler (git master version). Right now, saving a copy will always save the contents of the form fields if there are changes. I'm not sure whether it would be better to use save and save as instead of save a copy. Or maybe just add a checkbox to save filechooser to be able to choice whether save the contents fo the form fields or not.
currently in evince 2.22.0 filled out forms show up when printed but cannot be saved.
You need poppler >= 0.7.0
I think the second way proposed in the initial description would also have it's own benefits. The PDF spec describes the FDF format to save PDF form data separate from the PDF itself. There also exists an XML version called XFDF. I think it would be very valuable if evince could save forma data into FDF or XFDF files (the latter might be easier to handle, since they are XML, not binary) and load X/FDF data back into a PDF form. This has the benefit that for different versions of one form one would not need to keep several copies of the PDF file, but could have one PDF form with multiple data files. Should I open a new feature request for this, or is this place correct (since this actually is a solution to the problem described above)?
This appears to be done in the version of Evince (2.24.1) and Poppler (0.8.7) that have shipped with Ubuntu Intrepid--filling out a form and selecting 'File->Save a Copy' saves the filled-in form as it should. I believe this task can be closed.
Well, it's still open because of the discussion about the save, save as and save a copy
Created attachment 134428 [details] PDF form that fails to save filled
libpoppler3 0.8.7 libpoppler4 0.10.5 evince 2.26.1 Xubuntu 9.04 Saving attached pdf file - forms filled - produces a 0B (empty) file. Reproducible.
Liquider, that's because the document you attached is encrypted; your report is a duplicate of bug 564268. It's a poppler bug, and it's fixed in version 0.10.6. (Using that version puts up an error message when the file can't be saved.)
The request to support (X)FDF is probably a separate issue. I filed it as bug #602441.
(In reply to comment #8) > This appears to be done in the version of Evince (2.24.1) and Poppler (0.8.7) > that have shipped with Ubuntu Intrepid--filling out a form and selecting > 'File->Save a Copy' saves the filled-in form as it should. I believe this task > can be closed. Still an issue with Evince 2.28.1 using poppler 0.12.0 (cairo). How to reproduce: 1. Download an official income tax declaration for Geneva, Switzerland: http://ge.ch/impots/portal/jcr?workspace=EtatDeGenevePublie&path=/afc/documents/IS/2010/IS%20decla10_fr.pdf 2. Edit the "Nom" field 3. Ctrl-S 4. Alt-S (Saving the file to the desktop) 5. Open the new file with Evince The text entered is not in the new file. Also, if I try to save the edited file over the original, Evince crashes. Please reopen this bug.
Reported crash as bug 613025.
More info / work-around: 1. Saved http://ge.ch/impots/portal/jcr?workspace=EtatDeGenevePublie&path=/afc/documents/IS/2010/IS%20decla10_fr.pdf as form.pdf 1. Ran `sudo apt-get install acroread` 2. Opened the document in Adobe Reader 9. It said that "You cannot save data typed into this form." I checked the document restrictions summary, and it says "Filling of form fields: Allowed", which seems to contradict the previous statement. 3. Ran `pdftk form.pdf output new.pdf allow FillIn` 4. Opened new.pdf in Adobe Reader 9. Still got the same message about being unable to save form data. 5. Opened new.pdf in Evince, modified form data, and saved. This time it worked fine! Looks like Evince actually works better than Adobe Reader 9, and that something is strange with the document restrictions in the original document.
Victor, the permissions on the file are, in fact, not broken. See the PDF 1.5 spec (http://www.adobe.com/devnet/pdf/pdfs/PDFReference15_v6.pdf), table 3.20 starting on page 98. Filling out form data is a permission bit unto itself, separate from printing or saving a document; there are plenty of forms out there designed to be filled and printed rather than filled and saved. (This strikes me as more than a bit silly, but it's the way the system is set up.) The crash, of course, was definitely a bug.
Thanks for the clarification, Adam.