[Plplot-devel] pdf driver

2006-12-29 Thread Werner Smekal
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.phpp=sourceforgeCID=DEVDEV
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] pdf driver

2006-12-29 Thread Andrew Roach
At 10:53 PM 29/12/2006 +0100, you wrote:
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

Nice !

About five years ago I wrote a PDF driver using a PDF library whose source 
code was available, but wasn't Open Source - rather some unusual licence - 
so shelved it. I looked at libharu as an alternative when they first 
released it, but at the time it was dependent on C++, so I didn't pursue it 
at all. Having looked at their web page just now, it seems that version 2 
is ANSI C - is that right ? Or does it still have dependencies with C++ ?


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.

A4 is probably best for everyone EXCEPT North Americans, so don't feel bad 
about that !

Might I also suggest letting the user set their own explicit page 
dimensions using plplot's regular command line options as well as flags for 
pre-defined sizes ?

-Andrew



-
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.phpp=sourceforgeCID=DEVDEV
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel