When one exports a PDF as an Okular document archive, it should be possible to just as easily convert it back to a PDF file, while preserving annotations. In other words, someone please make a GUI option to save .okular archives as .pdf with embedded annotations. Current workaround: 1: Extract the .okular archive with archive manager (original pdf + 2 XML files) 2: Make an annotation in the newly unpacked pdf. This creates an xml file containing the annotation data in ~/.kde/share/apps/okular/docdata/ 3: Replace the file created in step 2 with the 'metadata.xml' file from step 1. Reproducible: Always Steps to Reproduce: 1. Export PDF with annotations as File -> Export as -> Document Archive 2. Open .okular file. 3. Try saving it as a PDF
Just use the save action in the file menu?
Doesn't "Save As" work?
No, "Save as" only saves to whichever format the file has. It doesn't convert to or from .okular. To save a PDF as an okular archive, you need to "Export as --> Document archive". There should be an option to do it the other way around as well, i.e. "Export as --> Portable document format" or something.
Ah so what you want is opening a file you have previously saved as .okular and save it together with the changes you made in a .okular to a .pdf? Why did you save it originally as .okular then?
Because the pdf was encrypted, and I couldn't save changes to it. When I was done with the annotation, I wanted to save it as a PDF again. I've decrypted the PDF now and worked around it as described, but it was a tedious process.
Well, it's a pretty corner-case use-case, but sure, if someone comes up with a patch we can review it.
As of KDE Applications 17.12, saving an Okular document archive originating from a PDF back to a PDF while preserving annotations will be supported. Not only that, it also works actually (just tested it :). As for saving arbitrary formats to PDF, this can be achieved to some degree via printing in theory. However, preserving annotations probably won't work in that case. If anyone is actually interested in this, a new bug should be opened.