Saving/backup Okular annotations?

Discussion in 'all things UNIX' started by AlexC, Dec 8, 2011.

Thread Status:
Not open for further replies.
  1. AlexC

    AlexC Registered Member

    Joined:
    Apr 4, 2009
    Posts:
    1,288
    Hello,

    I'm currently using Okular for study purposes. However, i noticed that the annotations, highlights, etc aren't saved in the PDF itself. About that subject i found these answers in Okular FAQ's

    http://okular.kde.org/faq.php#addedannotationsinpdf

    Why the newly added annotations are not in my PDF document?
    Short answer: Okular cannot change the annotations in PDF documents.

    Longer answer: the library used for reading PDF documents (Poppler) does not allow changing the annotations inside a PDF document. Also, due to the fact that Okular allows you to annotate in any kind of document it supports (even if that format does not support annotations), Okular saves the annotations internally in the local data directory for each user.

    How can I annotate a document and send it to a friend/colleague/etc?
    Since KDE 4.2, Okular has the "document archiving" feature. This is an Okular-specific format for carrying the document plus various metadata related to it (currently only annotations).
    You can save a "document archive" from the open document by choosing "File -> Export As -> Document Archive".
    To open an Okular document archive, just open it with Okular as it would be eg a PDF document.[/CODE]

    So, is there any way to backup the local data directory where Okular saves the annotations, so if i need to reinstall the OS i won't lose them?

    Or if i choose "File -> Export As -> Document Archive", i can save the document in a pendrive, reinstall the OS and Okular, and then continue working in the PDF without losing my annotations?

    Thanks a lot!

    I also posted this question in Ubuntu forums, since i didn't found any forum specifically about Okular: http://ubuntuforums.org/showthread.php?t=1892754
     
  2. Ocky

    Ocky Registered Member

    Joined:
    May 6, 2006
    Posts:
    2,713
    Location:
    George, S.Africa
    I am not sure about Okular, but you can do it this way as well:-

    Open pdf in OpenOffice (Drawing), make alterations/annotations and then export as pdf.
    You will be able to display all changes in Adobe Reader or in Okular.

    Or:-

    Open pdf in Gimp, make changes/annotations etc. save as jpg. Then open in Open Office and export as pdf.
    Everything you have changed will be shown in Adobe Reader and in Okular.

    I mention the second option (Gimp) because you can do a lot more with it than you can
    with Open Office Drawing.

    EDIT: There is no way you can achieve what you are looking for unless you only use okular. Sending an okular annotated pdf to someone who uses adobe reader means that
    they won't be able to see the changes you made. If you can convince them to also use okular, that would be fine provided you send them the archive.

    (btw. in ubuntu annotations are kept in /home/alexc/.kde/share/apps/okular/docdata)
     
    Last edited: Dec 9, 2011
  3. AlexC

    AlexC Registered Member

    Joined:
    Apr 4, 2009
    Posts:
    1,288
    Thanks Ocky,nice info!
    I'll try Libre Office Drawing, seems the better option to me :thumb:
     
  4. Ocky

    Ocky Registered Member

    Joined:
    May 6, 2006
    Posts:
    2,713
    Location:
    George, S.Africa
    AlexC,
    I recommend giving pdftk a try http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/
    (in the repos).
    With it you can merge, watermark, stamp pdf's and more. If you want to there are GUI
    tools as well that you can install after you have installed pdftk. Pdf-Shuffler & Pdf Chain.

    If you find that one or other pdf that you have opened in Open/Libre Office is all garbled,
    simply open a terminal, cd to the directory where your pdf is located and type:

    pdftk A=thegarbled.pdf output nice.pdf

    It will then open as it should in Open/Libre Office. :) Note: that 'trick' doesn't always work !
     
    Last edited: Dec 10, 2011
  5. AlexC

    AlexC Registered Member

    Joined:
    Apr 4, 2009
    Posts:
    1,288
    Thanks for the suggestion Ocky.
    I gave up on Libre Office Drawing because or it takes too long to open large pdf files, or it doesn't open at all... I looked to pdftk site, but it unfortunately seems to lack features i need like annotations and highlights.

    Anyway i found that ["File -> Export As -> Document Archive"] saves the changes, even if i do a complete removal of Okular (i even removed the annotations kept in /home/alexc/.kde/share/apps/okular/docdata to be sure):thumb:
     
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.