Antwort: [mapserver-dev] PDF support wrap up...

Dan Little danlittle at yahoo.com
Wed Jan 21 13:41:05 EST 2009


I'm glad I'm not totally alone in how I see it. :-) I was remembering from the last couple weeks when it seemed like there were folks looking to start writing layout generators to the Nth degree.  


----- Original Message ----
> From: Brent Fraser <bfraser at geoanalytic.com>
> To: Dan Little <danlittle at yahoo.com>
> Cc: mapserver-dev at lists.osgeo.org
> Sent: Wednesday, January 21, 2009 12:07:38 PM
> Subject: Re: Antwort: [mapserver-dev] PDF support wrap up...
> 
> 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