[Okular-devel] How to best express annotations

Jakob Voss jakob.voss at gbv.de
Thu Nov 4 12:26:55 CET 2010


Hi,

Apparently annotations are an issue that is still not resolved. You 
should be able to read and modify annotations that were created by other 
PDF readers, but poppler does not support it. There are also good 
reasons to store annotations separated from the original document. But 
each applications seems to have its own proprietary format to store and 
exchange annotations. I summarized some notes here:

https://github.com/nichtich/marginalia/wiki/Support-of-PDF-annotations

It looks like Okular uses its own proprietary format to express 
annotations in metadata.xml. Can you point me to any documentation of 
this format? How does it compare to the format used by other 
applications (Xournal, iAnnotate, Evernote etc.).

You could transform okular annotations to PDF annotations, and vice 
versa. The iText PDF library seems to support reading and adding PDF 
annotations. A simple sample script can be found at:

https://github.com/nichtich/marginalia

you should be able to get it running thanks to Maven, which makes 
programming in Java suck at least less. But before programming a 
converter for each custom annotation format - why not just using a 
subset of XFDF? XFDF is known for storing PDF form data, but it also 
supports PDF annotations in XML:

XML Forms Data Format Specification (XFDF) 2.0 (2007). 
http://partners.adobe.com/public/developer/en/xml/xfdf_2.0.pdf

PDF annotations are defined in chapter 8.4 of the PDF reference (2006), 
page 604-647. see 
http://www.verypdf.com/document/pdf-format-reference/pg_0604.htm

Anyway, a standard file format for Annotations which can be extracted 
from and added to PDF files, would be best.

Jakob

-- 
Jakob Voß <jakob.voss at gbv.de>, skype: nichtich
Verbundzentrale des GBV (VZG) / Common Library Network
Platz der Goettinger Sieben 1, 37073 Göttingen, Germany
+49 (0)551 39-10242, http://www.gbv.de


More information about the Okular-devel mailing list