[mapserver-dev] pdf output development?

Brent Fraser bfraser at geoanalytic.com
Wed Jan 7 10:52:38 EST 2009


thomas bonfort wrote:
> Hi Brent,
> 
>> And I've been able to compile Thomas Bonfort's Cairo-based work on Windows
>> XP/VC++ to produce: http://139.142.13.163/Download/Mapserver/topo2_cairo.pdf
>> (note that my modifications for scale and placement have not been applied to
>> this).
>>
> That's great news as I hadn't in the least looked at anything else
> than *nix for compilation. I hope it wasn't to much of a pain.

Not too much.  Collecting and compiling the dependencies was the biggest difficulty (took a couple of hours).  Of the 20 lines of code I did change, 90% were due to declaring variables after executable code in a block (VC++ is very picky about that in C file).  Moving them to the top of the block solved the problem.  A few were include file specs, and at least one change was related to updating a structure in a function not being passed back to the calling function (I think it's due to the way I compiled the libraries).  I'll send you my changes.

> 
>> It seems like there's been a renewed interest in pdf output lately, so I'm
>> wondering how to proceed with development.  Should we allow a choice of PDF
>> renderers (Cairo, PDFlib-lite, Haru) at compile-time/run-time?
> I'd favor having compile-time options for support (--enable-harupdf),
> and runtime selection, as this is the usual mapserver way of doing
> this. I'd also favor dropping the pdflib support (as it's license
> doesn't fit nicely with the rest of the code, and is currently more or
> less unmaintained)
> 
>>  Re-implement
>> PDFlib/Haru following "plugin" method of the Cairo implementation?
> in theory, a strong +1 for this. In practice, did you get a chance to
> look at how things where done in the plugin code? If so, would this
> fit with the libharu api? Note that the plugin code is really a first
> shot and is far from set in stone. Any comments you'd have on adapting
> the api would be more than welcome.
> 

I reviewed some of the plugin code while building.  Seems elegant, but I don't feel qualified enough to give an opinion on architecture. When I read your email on Dec 25, I thought it was implemented as a run-time plugin (i.e loading a shared library at run-time), allowing renderers to be delivered asynchronously from the mapserver executable.  Now that would be cool.

As for Haru, it may be a good test case for the plugin renderer architecture.

Brent





More information about the mapserver-dev mailing list