Antwort: [mapserver-dev] PDF support wrap up...
Brent Fraser
bfraser at geoanalytic.com
Wed Jan 21 13:07:38 EST 2009
Dan,
That is basically the Mapserver PDF strategy (as I see it), with the addition of some Cartographic Surround middleware (separate from Mapserver) to ease the user-driven generation of a graticule, scalebar, and north arrow after Mapserver has generated the map portion of the PDF (or SVG). These should not be done by hand (you could if you really wanted to!) as they are precisely related to the coordinate system of the map.
Brent
Dan Little wrote:
> To quote the originator of the thread, "that sounds like a job for MapScript." ;)
>
> IMO, having Mapserver draw into a PDF is fantastic. However, I think it's rendering should be limited to exactly that -- drawing the map into the PDF. Allow the driver to specify format options to place the map in the page and specify page size. Mapscript could foreseeably even change the driver/format options dynamically to allow for the map to be moved depending on user input. There may need to be some more information to work on specifying Legend and Scalebar placements... but I'm running with an idea right now so everyone bear with me...
>
> Then either allow the PDF to be serialized and consumed by another PDF library, or simply written to a temp directory on disk and then opened. This model would work in any of the popular scripting languages (PHP, Python, Perl, Ruby, probably Java but
> I've never used it for such a purpose) and it would keep the role of mapserver and the complexity of the PDF rendering to a minimal. This also allows folks to do WHATEVER they want with the PDF output. I'm thinking the code would universally follow this type of pattern...
>
> * Get User Input
> * Set Map Size/Placement/Layers, etc. based on Input
> * Save the PDF
> * Open PDF with native library
> * Add markup and decoration (titles, info, north arrows, etc.)
> * Return PDF to the user via a preferred method.
>
> I would envision a simple script which adds a page title to be no more than 30 lines long.
>
More information about the mapserver-dev
mailing list