From what I recall, Okular seems to handle a PDF's form data implicitly, transparently saving the data somewhere upon closing the PDF. When 2 instances of Okular are viewing the same PDF, the form data from the last instance to be closed is the data the gets saved, without warning. I needed to fill out a long form while referencing instructions placed in the same PDF after the form; rather than scroll between the instructions and the form (or figure out the 'correct' way to view both at the same time), I simply opened the whole PDF again (`okular path/to/the.pdf' &), so that I could flip between the instructions and the form using my window manager. When I was finished, I closed the form and then closed the instructions, and then realized that all of my work must have been destroyed, which it was indeed. I find it odd that Okular doesn't treat such form data more traditionally, asking the user if data should be saved, and checking whether the file to which it would save has changed already, etc; perhaps Okular should allow the user to specify an explicit form data file, too. As it is now, It feels like handling form data was kind of tacked on using some hack within an existing feature (such as the implicit saving of which page the user was last reading). Reproducible: Always Steps to Reproduce: 1. okular path/to/the.pdf & 2. okular path/to/the.pdf & 3. Edit a form in one instance, close that instance, then close the other instance. Actual Results: Form data is that of the instance which was closed last. Expected Results: Form data is not necessarily that of the instance which was closed last. Okular should check to see whether data should be saved, and indeed whether data has already been saved by something else.
Bug confirmed (Okular 0.19.60). Most probably the program should check for existing modification (as kwrite/kate do) and ask for.
Even worse, if you have two copies of the same PDF file, the edits you make to fields in one file will overwrite the other one. This happens if the copies are created by copying the file in the file manager or when using 'save copy as', but not if 'save as' has been used.
Still in Okular 1.1.3 and it is in my opinion a dataloss issue (from the user's perspective).
Related bugs: https://bugs.kde.org/show_bug.cgi?id=362996 https://bugs.kde.org/show_bug.cgi?id=267350 In my opinion okular should save form data out of band only for recovery purposes, and when exiting prompt the user to either save the in the pdf itself or discard the data. I'm happy to work on this if no one else is.
(In reply to Andrew Chen from comment #4) > Related bugs: > https://bugs.kde.org/show_bug.cgi?id=362996 > https://bugs.kde.org/show_bug.cgi?id=267350 > > In my opinion okular should save form data out of band only for recovery > purposes, and when exiting prompt the user to either save the in the pdf > itself or discard the data. > > I'm happy to work on this if no one else is. https://phabricator.kde.org/T4151
For people that have an idea how to compile and test stuff, please test https://phabricator.kde.org/D8642
This won't be anymore the case starting with the Okular that will be part of KDE Applications 17.12 (aka okular 1.3.0)