This forum has been archived. All content is frozen. Please use KDE Discuss instead.
Please use bugs.kde.org for bug reports or feature requests. Development related questions should be directed to the okular-devel mailing list.

Storing Okular PDF annotations in a separate file

Tags: None
(comma "," separated)
User avatar
smartgig
Registered Member
Posts
1
Karma
0
Hello,

Is it possible to set okular to save annotations in a separate file (the old .xml file style) ? I remember Okular used to store annotations in ~/.kde/share/apps/okular/docdata

Im using the last version of okular (v1.2.70) and annotations are saved in pdf files by default. I didnt find any options in the settings to change this behavior !

Thanks
robson
Registered Member
Posts
8
Karma
0
Okular destroyed the best feature... now is mandatory save the annotation embed in the pdf file. Why they did that?!

"This document contains annotations or form data that were saved internally by a previous Okular version. Internal storage is no longer supported.
Please save to a file in order to move them if you want to continue to edit the document."
rkflx
Registered Member
Posts
22
Karma
0
By popular demand (and because storing natively to the PDF makes more sense anyway), for KDE Applications 17.12 / Okular 1.3 the saving behaviour has been changed to always save in the PDF, the XML file is not used anymore (for annotations at least).

If you want to keep a separate PDF without the annotations, now your only option is to make a copy. Note that the ".okular" document archive format is still supported.

Could the old behaviour be brought back as an option? I don't think that's very likely, as both from a code complexity / maintenance standpoint as well as the overall usability / UI options concentrating on the most sensible and most wanted implementation is the way to go.

Could you detail your specific workflow, i.e. what it is you actually want to achieve by storing the annotations separately? Maybe there is another way to achieve your goal, or Okular's developers could consider other ways to implement something similar.
highsciguy
Registered Member
Posts
84
Karma
0
It appears to me that the origin of the confusion is that the error message is somewhat misleading. Knowing that annotations were previously by default stored in xml files in a dedicated folder and not inside the PDF, I also interpreted "... internal storage ..." as okular not storing annotations inside PDFs anymore.

Otherwise, personally, I believe that it would be better to keep xml based storage as an option. In the use case of annotating PDFs that are under version control, storing annotations inside the PDF is tedious, since it generates conflicts if you don't want to commit your annotations.
However, the recent handling of this decision (via Save As) was somewhat awkward and intransparent.
I had opted for added a setting to the annotation menu "Store annotations outside the file" or something like that.

In the usability discussion I always don't understand why one does not add a function such as "Expert Mode" or a menu "Advanced Options" to collect functions that (apparently) disturb non-expert users.
highsciguy
Registered Member
Posts
84
Karma
0
I used to think that export of the annotations would still be possible using the export to document archive feature of okular.
However, now that I tried, I realized that the annotations are not exposed in the exported archive.
The .okular file contains two xml files (content.xml and metadata.xml), but I don't see my annotations in any of these.
My okular version is 1.3.2.

Is this intended or am I doing something wrong?

Last edited by highsciguy on Mon May 28, 2018 5:27 am, edited 1 time in total.
metalinx
Registered Member
Posts
39
Karma
0
OS
@highsciguy: The annotations are saved in the pdf inside the .okular file.

I've made a request:

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

I've installed OpenSuse 15, and Okular asked for save annotations to pdf file, as they are not locally stored anymore.

While there is more advanced pdf editor for Linux - 'Master PDF Editor', I still like to use Okular as viewer because of its annotations, which saved in separated XML files.

There are advantages:

1) searching inside or editing notes are very easy.
2) easy to transfer annotations and backup annotations without make a copy of PDF files, some are very large.
3) If I want to save annotations into pdf, there is already feature in Okular.


As said, if Okular removes this feature, too bad, but 'Master PDF Editor' is way better option.
ederag
Registered Member
Posts
1
Karma
0
Having separate annotations and original file was cool.
The workflow was smooth, once understood:
just the original file to save,
and if necessary, annotations were easy to find/modify.

Bundling them in a .okular zip archive would have been a nice solution, but
as announced 4 years ago (just found that discussion),
on the contrary, they chose to only rely on poppler for the annotations saving (for pdf),
even inside the .okular archive.
Bug report filed, to make this clearer.

The developers goal is understandable:
having only one way to store annotations for a given file type
seems easier to maintain.

Unfortunately, this makes .okular archives useless for pdfs,
and closes one way (batch creation of zip archives) to handle my collection of about 3000 articles (~ 3GB).

Has someone already found a way to automate the conversion ?
Is there an undocumented way to open and save from the command line ? (for batch conversion)
(otherwise I'll try with xdotool)
aurelian
Registered Member
Posts
1
Karma
0
I really think this feature needs to come back.
I'm currently using Okular as my PDF viewer/editor for reading research papers (in conjunction with Zotero as a collection manager), and the only feature missing is being able to store annotations outside the PDF, so as to leave the original unaltered.
Saving the annotated version as a separate file is really annoying.
Please bring this feature back!
Maybe it could be implemented as a plugin...
nortonah
Registered Member
Posts
1
Karma
0
I prefer to keep my PDF collection clean by saving Okular annotations to separate files. I've written a Python3 program (annotation-mgr) to do that.

The purpose of annotation-mgr is to simulate the old Okular behaviour for new Okular versions. While annotation-mgr is running, Okular appears to behave as though it saves annotations to separate files, leaving original PDF files un-modified.

For further info and download: https://github.com/ahnorton/annotation-manager


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]