Please read the following paragraph very carefully. This answer shows a way to upgrade Okular to 0.15 (with support for exporting annotations to PDF) on Ubuntu 12.04. Note that (as the OP has mentioned) the other solution regarding the Kubuntu backports PPA will get version 0.15 of Okular but will NOT give you the functionality to export annotations to PDF, which was something that the OP wanted. Unfortunately, you will find that this new functionality in Okular 0.15 is a bit limited, and it may not encode certain types of annotations into your PDF documents. In addition, upgrading can cause compatibility issues with fonts, etc. Thus, you should think twice before trying this.
To continue and try Okular 0.15 for yourself, you may want to first make a file old_packages.txt
containing a list of your currently installed packages/versions (if you forget this, don't worry):
sudo apt-get install aptitude
aptitude -q -F "%?p=%?V" --disable-columns search \~i > old_packages.txt
To prepare for the upgrade, add the following two lines to /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu/ quantal main universe
deb-src http://archive.ubuntu.com/ubuntu/ quantal main universe
Then run the following commands:
sudo apt-get update
sudo apt-get install okular -f
If you get any errors, try this (repeatedly until the Okular install succeeds):
sudo apt-get install -f
sudo apt-get autoremove -f
sudo apt-get install okular -f
After, this typing
okular --version
should show version 0.15.x. Finally, to prevent unexpected stuff from getting added/upgraded, you should probably comment out the two added lines in /etc/apt/sources.list
and do
sudo apt-get update
Please be warned that this procedure can cause other packages to be updated from the Quantal repository, creating compatibility issues with fonts, etc. The comments below this answer contain more information about this.
If you want to uninstall Okular 0.15 and undo all these changes to your packages, it is fairly straightforward. You should first do
sudo apt-get purge okular
sudo apt-get autoremove -f
At this point, you could use the old_packages.txt
file you initially created to downgrade all of your packages to their previous versions (see here for the details). Or you can do the following nice procedure (detailed in an answer to a question about rolling back Ubuntu).
Edit /etc/apt/preferences
and add the following
Package: *
Pin: release v=12.04
Pin-Priority: 1001
Finally, do
sudo apt-get dist-upgrade -f
sudo apt-get autoremove -f
You should now be back to your original 12.04 packages/versions.
April 16, 2014: Okular 0.19 introduces new features like **tabs** support
– nutty about natty May 29 '14 at 07:25