[Okular-devel] PDF Annotations (was Re: Possible GSOC project)

Jonathan Verner jonathan.verner at matfyz.cz
Mon May 2 10:27:16 CEST 2011


Hi,

so I've given up on the GSOC project, but I still have some interest 
in saving annotations from Okular :-)

> Given that slowly poppler is starting to support editing, it would be a
> better idea to just continue the work there

Unfortunately, I am not sure I would be up to this task. I will
try to look at it if I have time, though. I agree that a much
better solution is to use poppler, when it has the support.

I didn't have much to do on saturday (well, I did, but ... ;-) )
and hacked up a proof of concept short-term solution based
on the export interface and PoDoFo.  For now it can save basic text 
annotations.

If you think this would be an acceptable _short term_
solution, I would be willing to work on it further. 

There are some problems though:

1) PoDoFo doesn't yet have a stable api so I have included the full
podofo source and I link the popplerGenerator statically to the local
version.

2) PoDoFo uses C++ exceptions, so I have enabled them via -fexceptions.
I am not sure this is acceptable in KDE code.

I am attaching a very rough patch (It isn't cleaned up at all, I will
provide a cleaner one if you think this has some potential).

Have a nice day,

Jonathan


> The general idea - writing back annotations in PDF documents - is okay.
> Given that slowly poppler is starting to support editing, it would be a
> better idea to just continue the work there, instead of read using a
> library and write using another one. For some reasons, see comment #105
> in bug #151614 -- add to that also the fact that you could not have
> "real time sync" between what you edit and document saving done by the
> user.
> In general, working with a PDF library is a pain, I personally do not
> look forward in having to deal with two at the same time...
> 
> Note also we have a system to save modified files (used at the moment
> only for form fields), see the SaveInterface.


More information about the Okular-devel mailing list