[Okular-devel] Re: How to best express annotations

Jakob Voss jakob.voss at gbv.de
Fri Nov 5 11:19:01 CET 2010


Albert Astals Cid wrote:

>> 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.
>

> We do know how to improve Annotation support in Okular, it's just that we do
> not have time for it.

Well, does this knowledge only exist in your heads, or can you point me 
to some documentation, plans etc.? As far as I understand support of 
embedded annotations depend on poppler, but external annotations can be 
improved independent from that.

I know found that the important parts of Annotation format are located 
in class Okular::Annotation, and in the methods 
Okular::Annotation::store and Okular::AnnotationUtils::storeAnnotation.

 > Forgot to say that if you have time you are very welcome to help :-)

My strategy is to create a tool to both extract annotations from a PDF, 
and to merge annotations with a PDF. Okular file format could be used 
for the step between, but I'd strongly prefer a standardized format like 
XFDF, that can also be used by other clients.

Cheers
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