[mapserver-dev] pdf output development?

Brent Fraser bfraser at geoanalytic.com
Mon Jan 19 17:30:11 EST 2009


Ed,

  The stuff I've posted recently on the Mapserver-dev list is the result of my tinkering with the mapserver source code to get a plan together for Cartographic Layout.  It's really not even pre-alpha yet and not available (unless you are a developer and are willing to contribute).  Once I get a plan together, I'll request feedback, petition for support, write an RFC (or issue a Ticket), and then hopefully write some real code.  If the Gods are kind, it might make it into 6.0.

  The state of PDF output in the RELEASED version of Mapserver (e.g. version 5.2.1) is pretty raw and not currently suitable for finished map printing.  That said, it will produce a vector PDF readable by page layout GUI apps such as Inkscape, or viewer apps such as Acrobat Reader.


  To produce PDF output, your version of Mapserver must have the PDF library compiled in.  You can see if it is PDF capable by doing "mapserv -v" or "shp2img -v" on the command line and looking for "OUTPUT=PDF" in the response.  If it's not there, your version of mapserver does not support PDF and you'll have to find one that does, or compile your own.

  If it does support PDF, edit your .map file to add the PDF OUTPUTFORMAT (see http://mapserver.org/output/pdf.html), and generate the PDF doc by issuing something like on the command line:

  shp2img -m mymapfile.map -o mymap.pdf

Best regards,
Brent

boesiii wrote:
> Brent,
> 
> I am interested in trying to create a PDF output image similar to the ones
> you created but I am not sure how to proceed.   I have a basic mapserver
> setup.  I am not sure if I have any PDF libraries installed or what a PDF
> library is or used for.  I see the text that I need to add to the map file
> but I don't know if I need other files.
> 
> What other files or software do I need to install to produce PDF's?
> 
> Thanks,
> 
> Ed 


More information about the mapserver-dev mailing list