Bug 202159 - Multiple problems in PDF forms - checkboxes, save as, instant saving
Summary: Multiple problems in PDF forms - checkboxes, save as, instant saving
Status: RESOLVED NOT A BUG
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-01 01:59 UTC by Bob Willan
Modified: 2014-05-11 13:12 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bob Willan 2009-08-01 01:59:36 UTC
Version:           0.8.2 in Debian testing KDE 4.2.2-2 (using KDE 4.2.2)
OS:                Linux
Installed from:    Debian testing/unstable Packages

Using Debian Testing/Unstable KDE 4.2.2-2, Okular help reports v0.8.2.

I don't often use PDF's with forms, but the IRS has many of its tax documents as PDF's for downloading.  All of the following issues occur when using IRS Form 941 2009 pdf (pdfinfo follows).

You can download from http://www.irs.gov/pub/irs-pdf/f941.pdf

1) Fill in 1 or more fields and exit Okular (no save).  Start Okular again and open the file, and you'll find the fields still filled out.

2) Open the same doc in Acroread and its empty - no fields filled out.  No matter how many times you open the file in both programs, in Acroread fields empty, in Okular fields filled in.

3) Checkmarks filled in and saved using Okular are screwed up in Acroread - can't change them (they go on/off in sync with another checkbox, like Acroread is confused about something).  In KPDF, the checkboxes are empty if filled in by Okular.

4) If you use "Save As" and save the file on top of itself, it screws up the file making it unreadable and you better hope you had a backup.  Seeing as there is no "Save" in Okular, like there is in Acroread, using "Save As" to save on top of the file is a natural thing to do.  Please either fix it to work, or add checks to disallow it.  Or, better still, add a real "Save" button.  When you fill out a form, and then go back to correct an error, you don't want to have to save it under another name and then rename the file outside Okular after.

# pdfinfo f941.pdf
Title:          Form 941 (Rev. April 2009)
Subject:        Employer's Quarterly Federal Tax Return
Keywords:       Fillable
Author:         SE:W:CAR:MP
Creator:        Amgraf OneForm Designer Plus
Producer:       OneForm Designer Plus PDF Forms Generator
CreationDate:   Fri May 15 09:12:11 2009
ModDate:        Thu Jul 23 07:52:06 2009
Tagged:         no
Pages:          4
Encrypted:      no
Page size:      611.976 x 791.968 pts (letter)
File size:      352402 bytes
Optimized:      yes
PDF version:    1.6
Comment 1 Pino Toscano 2009-08-01 02:22:40 UTC
(In reply to comment #0)
> 1) Fill in 1 or more fields and exit Okular (no save).  Start Okular again and
> open the file, and you'll find the fields still filled out.
> 
> 2) Open the same doc in Acroread and its empty - no fields filled out.  No
> matter how many times you open the file in both programs, in Acroread fields
> empty, in Okular fields filled in.

Okular locally saves the values of the forms, while acroread does not.

> 3) Checkmarks filled in and saved using Okular are screwed up in Acroread -
> can't change them (they go on/off in sync with another checkbox, like Acroread
> is confused about something).  In KPDF, the checkboxes are empty if filled in
> by Okular.

This looks like a bug in the library we use for PDF documents, Poppler.
Please report it to https://bugs.freedesktop.org, "poppler" product.
KPDF does not support forms in any way, btw.

> 4) If you use "Save As" and save the file on top of itself, it screws up the
> file making it unreadable and you better hope you had a backup.  Seeing as
> there is no "Save" in Okular, like there is in Acroread, using "Save As" to
> save on top of the file is a natural thing to do.  Please either fix it to
> work, or add checks to disallow it.  Or, better still, add a real "Save"
> button.  When you fill out a form, and then go back to correct an error, you
> don't want to have to save it under another name and then rename the file
> outside Okular after.

Looks almost reasonable, except the acroread comparison.
Comment 2 Bob Willan 2009-08-01 07:26:25 UTC
================================
>On Friday 31 July 2009, Pino Toscano wrote:
>https://bugs.kde.org/show_bug.cgi?id=202159
>
>Pino Toscano <pino@kde.org> changed:
>
>           What    |Removed                     |Added
>----------------------------------------------------------------------------
>          Component|PDF backend                 |general
>
>--- Comment #1 from Pino Toscano <pino kde org>  2009-08-01 02:22:40 ---
>(In reply to comment #0)
>
>> 1) Fill in 1 or more fields and exit Okular (no save).  Start Okular again
>> and open the file, and you'll find the fields still filled out.
>>
>> 2) Open the same doc in Acroread and its empty - no fields filled out.  No
>> matter how many times you open the file in both programs, in Acroread
>> fields empty, in Okular fields filled in.
>
>Okular locally saves the values of the forms, while acroread does not.

In case it wasn't clear, I downloaded the pdf file before opening it in Okular 
- I was not reading/changing a remote file.

I'm not sure what you mean by "locally saves the values"?  If I open a form 
that already has some fields filled in, and I change those values but decide 
to exit instead of save the changes - are you saying I'm stuck with those 
changes now?  As far as Okular is concerned, I've changed the file (it even 
prints with the new values), but as far as other PDF viewers are concerned, 
the file has the original values.

[I found the xml file under .kde/share/apps/okular/docdata, and I can delete 
that file to solve the issue - but as a user that seems kind of unfriendly, 
not to mention confusing.  If you ever use another PDF viewer or try to print 
the PDF file using another program like pdftops or something - you think 
you've filled in the form, and Okular shows it, but nothing else sees/prints 
it]

>> 3) Checkmarks filled in and saved using Okular are screwed up in Acroread
>> - can't change them (they go on/off in sync with another checkbox, like
>> Acroread is confused about something).  In KPDF, the checkboxes are empty
>> if filled in by Okular.
>
>This looks like a bug in the library we use for PDF documents, Poppler.
>Please report it to https://bugs.freedesktop.org, "poppler" product.
>KPDF does not support forms in any way, btw.

I have reported it to Poppler, bug 23068.

I referred to KPDF because if I check a field in Acroread, KPDF sees it (along 
with all the other fields of the form that have values entered in them).  If I 
check a field in Okular and "save as" to another name, then Acroread sees the 
check, but KPDF does not.  Both Acroread and KPDF see the values in other 
fields (strings and numbers) in the form filled in by Okular.  I figured 
knowing there was a difference between Acroread, KDPF, and Okular for reading 
checkboxes might help locate the issue.

I just read that Evince also uses Poppler, and indeed, the checkbox is marked 
in Evince the same as in Okular.

>
>> 4) If you use "Save As" and save the file on top of itself, it screws up
>> the file making it unreadable and you better hope you had a backup. 
>> Seeing as there is no "Save" in Okular, like there is in Acroread, using
>> "Save As" to save on top of the file is a natural thing to do.  Please
>> either fix it to work, or add checks to disallow it.  Or, better still,
>> add a real "Save" button.  When you fill out a form, and then go back to
>> correct an error, you don't want to have to save it under another name and
>> then rename the file outside Okular after.
>
>Looks almost reasonable, except the acroread comparison.
>
>--
>Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
>------- You are receiving this mail because: -------
>You reported the bug.

Thanks,
  Bob
Comment 3 jordonwii 2011-12-20 17:15:23 UTC
This is a duplicate of bug 184489, per Mamarok.
Comment 4 Albert Astals Cid 2011-12-20 19:17:30 UTC
Not it is not a duplicate.

On the other hand there have been a lots of improvements in form handling since then and for the upcoming Okular in KDE 4.8.0, Bob, it would be interesting if you could update to KDE 4.8.0 once it is out (mid January) and tell us what you think of this particular behaviour
Comment 5 Albert Astals Cid 2012-08-18 17:46:06 UTC
Waiting for Bob's comments. And Bob if you try KDE 4.9 even much better since we've had even more improvements there
Comment 6 Fabio D'Urso 2012-08-18 18:16:49 UTC
> 4) If you use "Save As" and save the file on top of itself, it screws up the
> file making it unreadable and you better hope you had a backup.
This was fixed in poppler 0.20 (http://lists.freedesktop.org/archives/poppler/2012-April/009115.html).

Apart from this, in acroread the saved file still looks as if it was not filled. I haven't checked if it's poppler or okular's fault.
Comment 7 Albert Astals Cid 2013-03-10 21:49:48 UTC
Setting back to confirmed as Fabio's comments. Fabio maybe we could extract what is fixed and what is not and create a new bug? Could you do that?
Comment 8 Albert Astals Cid 2014-05-11 13:12:14 UTC
I'm going to close this bug, please report those bugs separately (check if they are not reported yet), it's very hard to work on a bugzilla item  when there's multiple issues reported in the same item since everyone jumps on it and it ends up being a kitchen sync with lots of issues instead of one so it's hard to focus on one because of the noise and it's also hard to properly close, set as needs info, etc since it's all dumped in one place.

Sorry for this and thanks for caring about okular :)