[okular] [Bug 402017] Cannot save PDF when loaded file has been deleted

David Hurka bugzilla_noreply at kde.org
Mon Jun 15 21:21:34 BST 2020


https://bugs.kde.org/show_bug.cgi?id=402017

--- Comment #23 from David Hurka <david.hurka at mailbox.org> ---
> But if you grep for saving in the okular poppler generator you'll find
> PDFGenerator::save. You can pull the thread from there.

Thanks. The related error message for annotated documents is “There are unsaved
changes, and the file 'file.pdf' has been modified by another program. Your
changes will be lost, because the file can no longer be saved. Do you want to
continue closing the file? [Continue Closing] [Abort Closing]“, which is quite
frustrating in itself.

> > Temporarily wasting some memory or disk space is a far better alternative
> > than data loss. :)
> 
> This won't behave nicely in editing sessions e.g. in kile or in other document
> producers, where you edit the sources and save+recompile to PDF often, [...]

Good point. But if okularpart runs in reader mode, there is no need to save the
document, so we don’t need an extra backup, right?

I wanted to suggest a size limit for such a backup, which could be linked to
the Okular memory setting. Suggestion:
Low: Backup files below 2MB; if they are not in the home directory below 10MB
Normal (default): Backup files below 10MB; if they are not in the home
directory below 20MB
Agressive: Backup files below 50MB
Greedy: Backup all files which fit into the free memory

And I just want to add: It’s not a problem in Firefox, but in Okular. Firefox
says “Hey Okular, please open this file and make the user happy!”, and not “Hey
Okular, please open this file and make the user happy. Oh, and please tell me
when you don’t need it anymore!”

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list