Haru PDF Library

Adam Blokus adamblokus at gmail.com
Mon May 26 15:51:35 BST 2008


This mail didn't get through yesterday - I think because of the attachments. 
Both files can be found in my branch (branches/adamblokus/harutest/)
-------
Hi,
I wrote a small example of the usage of the pdf-generating library I'd like to 
use(http://libharu.org/wiki/Main_Page). The code generates a pdf file (also 
attached) with some graphic primitives and an image.

The provided functionality is enough to cover all the plotting functions of 
the plotters_table interface. There may be some problems:
- with font handling (didn't work with some fonts for me)
- with font encoding - (as I understand it: there is some unicode support with 
chinese and japanese characters, but multibyte encoding seems not to be 
supported in general; this can be done by converting from utf8 to someting 
else first? )
- with images - there is support for png,raw and jpeg, but,as rjek pointed 
out-not for gif (this one can be added basing on what we already have in 
NetSurf)

There are still some developers working on this library, so these issues (esp. 
the first one, the second and third can be worked around in some ways) should 
be fixed someday. By now there are not critical obstacles.

Other possible choices, that I see, are:
- using cairo (has pdf surfaces, but with more limited functionality; rjek 
complained about its dependiences)
- making a .ps and convert it with GS
- hacking some sources of a program with a suitable licence to extract the 
needed functions
- finding another library ( although I made some research when writing my 
proposal and during the last few days and I didn't find anything better )

So I am proposing to use Haru - what do you think about it?

Adam



More information about the netsurf-dev mailing list