Evince cannot save filled PDF forms

Bug #492959 reported by Fibonacci on 2009-12-05
214
This bug affects 44 people
Affects Status Importance Assigned to Milestone
Evince
Invalid
Undecided
Unassigned
evince (Ubuntu)
Low
Unassigned

Bug Description

Binary package hint: evince

Whenever I open a PDF form, and make a change to it (any change, such as filling a field), and then try to save a copy on Evince, the resulting file is empty. Not as in empty fields, but as in zero-bytes-long file.
However, when trying to save a copy before any changes have been made, it works fine.

This is not the same as bug 299409, since in that bug the resulting files are not empty.

The particular form I'm trying to fill is http://www.box.net/shared/static/ia8aliz8ne.pdf

Fibonacci (fibonacci-prower) wrote :
Dave Walker (dogatemycomputer) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

I have tried to reproduce the problem using evince 2.28.1 on a vanilla installation of Karmic but I am unable to reproduce the problem using SAVE A COPY.

Please answer these questions:

* Is this reproducible?
* If so, what specific steps should we take to recreate this bug?

This will help us to find and resolve the problem.

Changed in evince (Ubuntu):
status: New → Incomplete
Fibonacci (fibonacci-prower) wrote :

Yes, this is reproducible:

1- Open the attached form on Jaunty.
2- Fill one or more fields.
3- Save a copy. Then the copy will be 0B long.

Changed in evince (Ubuntu):
status: Incomplete → New
Dimitrios Symeonidis (azimout) wrote :

What I get in Karmic is "the file could not be saved as xyz. Document is encrypted"

Pedro Villavicencio (pedro) wrote :

same error here, do you get the same issue with another pdf? or that's the only one you're facing this issue of non saving?

tags: added: needs-packaging
Changed in evince (Ubuntu):
importance: Undecided → Low
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
status: New → Incomplete
Fibonacci (fibonacci-prower) wrote :

No, I have also found the same problem with this document: http://www.cic.gc.ca/english/pdf/kits/forms/IMM5406E.PDF

Changed in evince (Ubuntu):
status: Incomplete → New
tags: removed: needs-packaging
Paul Ni (nikulinpi-gmail) wrote :

Also have the same error. I think severity should be higher, many people use it for filling official forms, like tax declarations, visa forms...

Paul Ni (nikulinpi-gmail) wrote :

I think current evince behaviour is very confusing. It fails to save a signed documents, but says that the file itself is encrypted, while it is only signed. It think evince should either append non signed data to non signed part of file and append non signed part is it is not present, or either just remove signature, notifying user about it.

Jeroen Hoek (mail-jeroenhoek) wrote :

I'm running into this issue too in Lucid. The Dutch Chamber of Commerce has downloadable forms that can be filled in, but not saved.

I agree with Bay that it would be good to at least allow users to save the filled in forms without signatures and encryption. The PDF is already viewable in Evince, so recreating the PDF as an unencrypted, unsigned copy is technically possible.

Jeroen Hoek (mail-jeroenhoek) wrote :

I should add that is of course possible to save to PDF by "printing" the PDF to file. But this also removes the form functionality. For complex formal forms, being able to save a partially filled in form is very useful and desirable.

Faldegast (faldegast) wrote :

Ping on this.

Does anyone have a solution?

Rolf Leggewie (r0lf) on 2010-10-27
Changed in evince (Ubuntu):
status: New → Confirmed
Jon Leighton (jonleighton) wrote :

I've just marked as a duplicate of #477644. I think this is correct - certainly the symptoms are the same for both reports.

That bug has a workaround which works for me:

qpdf --decrypt input.pdf output.pdf

Angry Coder (mdotychar) wrote :

This is definitely not a duplicate of bug #477644. That bug concerns unsuccessful saves of encrypted PDFs. I have removed the duplicate status.

This bug has absolutely nothing to do with PDF encryption.

This bug centers on the inability to successfully saves PDFs with embedded forms once you begin to input data into those forms.

Reference the OP for clearest explanation.

If anyone has any kind of workaround for this bug, please post ASAP.

José Aliste (jose-aliste) wrote :

I don't know why this bug has not been reported upstream before. I just reported it , see Gnome Bug #640185 ( I don't know how to link the bug in launchpad)

Hervé Pichenaud (hervepic) wrote :

Is there any solution for this problem or is it possible to use another software?

Here is additional information and steps to reproduce:
1. Get this IRS form: http://www.irs.gov/pub/irs-pdf/fw4.pdf
2. Open in terminal with 'evince fw4.pdf'. No warnings or errors are printed.
3. Enter data on one line, save a copy. Open in terminal again, one error is shown:
Error: Reference to an invalid or non existant object

If you enter data on e.g. three lines and save a copy, opening in terminal shows three errors:
Error: Reference to an invalid or non existant object
Error: Reference to an invalid or non existant object
Error: Reference to an invalid or non existant object

This is using 64-bit Lucid evince 2.30.3.

grosser (grosser-michael) wrote :

please fix this... its 2+ years old... and very basic problem... and with a very simple workaround...

Changed in evince:
importance: Unknown → Medium
status: Unknown → Confirmed

I needed a fix for this, so I made the attached bash script. Open your PDF files with this script and it will decrypt the file (overwriting the original) and open the decrypted file. Forms on decrypted PDFs can be saved.

For me, this is an adequate fix, because the encryption only seems to get in the way. I would be happy if Evince did the same.

I wrote this in 15 minutes and it's 4:45 in the morning, but it *seems* to work okay. Feel free to edit it, just post the new version here (or email it to me: <email address hidden>).

Thanks to Jon Leighton for pointing out qpdf!

Still repros in 12.10. Confirmed that qpdf --decrypt works around the problem.

Leland Woodbury (leland-g) wrote :

The last 2 comments from tshmelcher and sami-kankaristo (and others earlier in this ticket) may be relevant to a different bug 477644, but not this one. *This* bug is *not* about encrypted PDFs. As mdotychar noted above:

"This bug has absolutely nothing to do with PDF encryption. This bug centers on the inability to successfully saves PDFs with embedded forms once you begin to input data into those forms."

Since this bug is now 3 years old and still a problem, let's not confuse the issue further.

Now: Does anyone have an update on a fix?

Eric Williams (eric-canonical) wrote :

Testing the document linked in Comment #17 (fw4.pdf) works for me. I am able to change data, then save the form to the desktop. When I re-open the saved form, my data is there and I can continue working on it.

$ pdfinfo fw4.pdf
Title: 2012 Form W-4
Subject: Employee's Withholding Allowance Certificate
Keywords: Fillable
Author: SE:W:CAR:MP
Creator: Adobe LiveCycle Designer ES 8.2
Producer: Adobe LiveCycle Designer ES 8.2
CreationDate: Wed Dec 2 13:53:19 2009
ModDate: Fri Dec 2 13:55:40 2011
Tagged: yes
Pages: 2
Encrypted: no
Page size: 611.976 x 791.968 pts (letter)
File size: 109930 bytes
Optimized: no
PDF version: 1.7

You will still receive an error message "The file could not be saved as "[..]". Document is ecrypted" with the document in comment #14 (IMM5406E.PDF).

$ pdfinfo IMM5406E.PDF
Title: IMM 5406E : Additional Family Information
Author: Citizenship and Immigration Canada
Creator: PScript5.dll Version 5.2
Producer: Acrobat Distiller 5.0.5 (Windows)
CreationDate: Tue Jun 11 18:01:20 2002
ModDate: Thu Dec 31 11:39:14 2009
Tagged: no
Pages: 1
Encrypted: yes (print:yes copy:no change:no addNotes:no)
Page size: 612 x 792 pts (letter)
File size: 89569 bytes
Optimized: no
PDF version: 1.6

It appears that the ability to save form data in unsigned, unecrypted documents is working in Precise. It is still not possible to save signed documents with changed form data.

- evince 3.4.0-0ubuntu1.4
- poppler 0.8.14

Adobe Acroread from the partner repo has no problems saving the files, signed or not.

ii acroread 9.4.7-1oneiric1 Adobe Reader
ii acroread-common 9.5.1-1precise1 Adobe Reader - Common Files

Thanks,
Eric

Full name (nichmename) wrote :

Same problem here (using evince on debian), version 3.4.0-3.1, together with poppler/cairo 0.18.4

Please fix this. I spent three hours filling in a form, and now have to note it down *again* into another program.

A button called "Save As" really should *always* work. If some data would be lost, warn, but don't prevent the user from saving his work.

Notmyrealname (nichmeinechtername)

Lord Delta (lorddefinitia) wrote :

I have this problem as well.

I can print the pdf, and normal Adobe Reader can open and edit the resulting document, so I'm fairly sure this is an oversight in evince.

Raphael (drraph) wrote :

Evince still can't save filled in forms in ubuntu 14.04. This is using GNOME Document Viewer 3.10.3. I don't get any error but you simply lose the information you have filled in.

The simplest workaround is to use okular instead it seems.

Not reproducible with the original reporter's attachment (scope of this report) in Trusty.

Changed in evince (Ubuntu):
assignee: Ubuntu Desktop Bugs (desktop-bugs) → nobody
status: Confirmed → Invalid
Changed in evince:
importance: Medium → Undecided
status: Confirmed → New
Changed in evince:
status: New → Invalid
Hans Deragon (deragon) wrote :

I confirm that eform-0410-1.pdf is now working with evince 3.10.3, available with Ubuntu 14.04 LTS Trusty Thar. You cannot save the file under the same name, but you can save it under a different name (that is another bug).

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.