Bug 258475 - "save as" wipes out all annotations and closes document without warning
Summary: "save as" wipes out all annotations and closes document without warning
Status: RESOLVED NOT A BUG
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.10.2
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-01 12:27 UTC by Raphael
Modified: 2014-05-08 14:38 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raphael 2010-12-01 12:27:47 UTC
Version:           0.10.2 (using KDE 4.4.2) 
OS:                Linux

If you are using the annotation feature of okular and after doing work mistakenly choose "save as" instead of "export as", okular not only fails to save the annotations without warning but it then seems to attempt to reload the document as a pdf (which fails) thereby deleting all the work you have done.

Reproducible: Always

Steps to Reproduce:
Use okular to add annotations to a pdf. Choose "save as" and save the document.

Actual Results:  
Document you are editing closes and saved version is unusable. All your work is lost without warning.

Expected Results:  
"save as" dialog could say "WARNING. Cannot save document with annotations. Choose 'export as' instead or all your data will be lost."

OS: Linux (i686) release 2.6.32-24-generic
Compiler: cc
Comment 1 Raphael 2010-12-01 16:23:41 UTC
To be more precise about the steps to disaster. Here is what I did.

1. Load file.pdf in okular
2. Export as file.okular
3. Annotate for several hours
4. Save as file.okular
5. See that okular has tried and failed to reload the document and the saved version is useless.
Comment 2 Albert Astals Cid 2010-12-01 21:22:04 UTC
I see that it sucks losing the work, but you already got asked if you wanted to overwrite the file. What you want us to do? To ask again?
Comment 3 Raphael 2010-12-01 21:54:56 UTC
No sorry that isn't the point. 

The steps were as above so I had at this point never saved the annotations at all and was overwriting a file I didn't care about (file.okular) not the original file.pdf which I did care about. The problem is not the overwriting per se. The problem is that a) it loses all your annotations when you choose save as instead of export it seems (without warning) and b) it then reloads automatically which has the effect of closing the document you are annotating so you can't fix the problem by then exporting correctly.

To be clearer, when editing a document in word processor, say, and you save a copy on top of an old one, it will usually say "warning you are overwriting" but it doesn't mean "warning you are overwriting with something that is unusable so you will lose both the old and the new version." In fact OpenOffice does give a warning about losing formatting when you save in the wrong format which is sort of relevant and might be of interest.

What I think would be better would be a message that warns that you have chosen the wrong option and are saving a document with annotations.  That is you will lose all your work unless you choose  'export as' instead.

Actually, even better would be if the "export as" option disappeared and "save as" just had a drop down list of formats, one of which supported annotations.
Comment 4 jordonwii 2012-01-05 05:29:54 UTC
I'm unable to reproduce in Okular 0.13.3. Raphael, can you still reproduce?
Comment 5 Albert Astals Cid 2014-05-08 14:38:05 UTC
No answer from the user in 2 years.