Season of KDE 2006

Improving pattern rendering in okular

A Season of KDE 2006 project by Rafael Rodriguez
Mentored by Albert Astals Cid

Project Details

KPDF is probably the best open source PDF viewer. okular is a project started in last year's Summer of Code which is not ready for prime time yet.

Both make use of a PDF rendering library named "poppler", written in C++. One of the fields where it has room of improvement is in rendering PDFs which contain patterns. Some documents take 3 minutes to render in KPDF (if rendered at all) while just 3 seconds in Acrobat Reader.

Due to the current work being done in the "trunk" branch of KDE to port it to Qt4 for the future KDE 4 release, all the work would be done in this same branch. However, in the first phase of the project I would primary learn about poppler and its structure, which has evolved and grown up big in the last months due to the continuous problems that using xpdf libraries represented.

So my proposal would have to cover several areas:

  • LEARNING: I have the required base knowledge of C++, Qt and KDElibs programming. However I don't know that much about Qt4, (still under HEAVY development) KDElibs4 (and the brand new building method, cmake) or PDF language. It would take me some days to get used to them and start being productive.
  • IMPROVING POPPLER: a better pattern handling must be implemented, following the specifications of the PDF specification 1.6 (see the link, section 4.6, patterns), and always with speed and eficiency in mind. I have some experience in using profilers such as OProfile, valgrind or gprof, which I could use here for sure.
  • MAKING KPDF/OKULAR USING THE NEW CODE: finally KPDF and okular should be aware of the new code in poppler, probably working in the latest code available in the trunk branch of KDE's subversion repository.
  • TESTING, TESTING, TESTING: at this point, there should be some regression tests and lots of testing so the two applications and the library are hopefully bugfree.
  • [ Edit ]