Please use bugs.kde.org for bug reports or feature requests. Development related questions should be directed to the okular-devel mailing list.
Reply to topic

How to recover annotations after losing the saved annot. pdf

indu
Registered Member
Posts
1
Karma
0
I was annotating a pdf file, say, original.pdf. I saved it with "Save as", but with another name: original-annotated.pdf. Later I unadvertently overwrote that file original-annotated.pdf with the annotations of other file. I still have the original.pdf and the xxxxx.original.pdf.xml file with the correct annotations. How can I force okular to add the annotations contained in the xml file back to the original file again? (I can add some of them manually, but I have lots of highlight markings, underlines etc that are specified with coordinates in the xml file. If there is no way to recover them, how can I interpret those coordinates in order to be able to put my comments back in place?) Many thanks!
rkflx
Registered Member
Posts
22
Karma
0
Not sure I can follow you here. If you still have original.pdf and xxxxx.original.pdf.xml, Okular should open original.pdf just fine? Perhaps you mixed up some of the filenames in your comments or are missing a step in your explanation?

In general, matching between XML and PDF is done by several means:
1. filename: open the XML file and look at the <documentInfo> tag
2. the filename of the PDF is also contained in the filename of the XML
3. file size: the number at the start of the filename of the XML file is actually just the filesize of the corresponding PDF in bytes (as displayed in Dolphin's properties).

By editing these values to be in sync with the XML und PDF files you like to combine, you should get your annotations back.

Also note that since Okular 1.3 (KDE Applications 17.12), "Save" will directly save annotations to the PDF, so mishaps with renaming and mixing up XML files should no longer be an issue. (Backwards compatibility is still there though, i.e. Okular can still open the XML files at least and offers to save them natively once.)

HTH ;)

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot], rblackwell, Rytelier, Sogou [Bot], WampaCowboy