I know that Okular saves the annotations made in a PDF document in ~/.kde/share/apps/okular/docdata. I would like to change this directory into the same one where the PDF document is. I cannot seem to find this possibility

The purpose is moving around the base document and the annotations in tandem by copying just one directory, and still keep them separate in case I want to distribute the non-annotated PDF alone.

Can I customize the folder where annotations are stored? If so, how should I code the directory where the current document is?

Note: I run on Ubuntu 14.04 LTS, and the supported version of Okular is 0.19.3 (Using KDE Development Platform 4.13.3)


The short answer is that you can’t.

As indicated in the documentation,

Annotations created in Okular are automatically saved in the internal local data folder for each user.

(as you determined). Looking at the source code, this isn’t externally customisable; to change this behaviour, you’d need to change the program itself.

There are two supported ways of storing annotations with the PDF file:

  • exporting a document archive, which is a single file storing both the PDF file and its annotations;
  • saving the PDF as a new PDF, which will contain the annotations too.

Neither of these address your requirement to be able to provide the un-annotated PDF; there doesn’t seem to be a way of doing that easily, short of providing a copy of the original PDF yourself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.