Hi,

while working on a plot for my thesis I thought it would be cool to have 
pdf output. I was googling around and found a free pdf library (zlib 
license) in ANSI C, working on all major platforms:

http://libharu.sourceforge.net/index.html

So I took the svg driver, rewrote it for the pdf library, wrote some 
cmake modules and ready I was (after some hours :).

To use this driver we need first to install it (configure/make/make 
install for Linux, and make -f script/Makefile.??? for Windows) and set 
the environment variables for cmake accordingly so that cmake can find it:

set HPDFDIR=%USER_ROOTDIR%\libharu-2.0.8
set PATH=%HPDFDIR%;%PATH%  (for windows dll)
set CMAKE_INCLUDE_PATH=%HPDFDIR%\include;%CMAKE_INCLUDE_PATH%
set CMAKE_LIBRARY_PATH=%HPDFDIR%;%CMAKE_LIBRARY_PATH%

There seems to be no debian/rpm package of this library, so Linux users 
need to compile this library as well.

Than run cmake with -DPLD_pdf=ON (since it is disabled by default) and 
off we go.

Five remarks:
1) in pdf.cmake is a compile flag added which won't work for Unix 
-DHPDF_DLL - this I need to change.
2) The paper size is hardcoded to A4 in the moment - good for Europeans, 
bad for anybody else, I need to add some flags for other formats.
3) the font used is only the hershey fonts in the moment - on the basis 
of the svg driver I should be able to add nice fonts.
4) I didn't test the driver on Linux yet, but I don't expect much problems.
5) Output is not compressed in the moment, since I need zlib for Windows 
as well (not too much problem), so expect big files - but the driver is 
actually very fast.

I hope this driver is useful - if my choice of the pdf library is not 
welcome, there is not much problems using another one - if there is 
another library which suits our needs better.

Regards,
Werner

-- 
Dipl. Ing. Werner Smekal
Institut fuer Allgemeine Physik
Technische Universitaet Wien
Wiedner Hauptstr 8-10
A-1040 Wien
Austria

email: [EMAIL PROTECTED]
web:   http://www.iap.tuwien.ac.at/~smekal
phone: +43-(0)1-58801-13463 (office)
        +43-(0)1-58801-13469 (laboratory)
fax:   +43-(0)1-58801-13499

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to