[mapserver-dev] pdf output development?

Ned Harding nharding at extendthereach.com
Wed Jan 7 07:57:37 EST 2009


Hey Brent, 

I am sure we are not typical users at all, but for our purposes we would
want a programmatic interface to Haru.  At the same time as using
MapServer to render a map into a PDF, we would use other code to put
lots more into the same PDF.  The ideal would be able to pass a
previously created Haru handle into Mapserver as well as location info
and render a map into the pdf.

In short, flexibility at the C API is what we would be looking for.  I
agree with other comments that it would be difficult to have enough
options in the mapfile to please everyone.

ned.

-----Original Message-----
From: mapserver-dev-bounces at lists.osgeo.org
[mailto:mapserver-dev-bounces at lists.osgeo.org] On Behalf Of Brent Fraser
Sent: Tuesday, January 06, 2009 4:00 PM
To: MAPSERVER-DEV
Subject: [mapserver-dev] pdf output development?

Hi All,

  I've been investigating some enhancements to make the pdf output more
suitable for printed map production.  So far, aside from some minor bug
fixes, I've coded a few new FORMATOPTIONS in my local copy of mappdf.c
to allow more user control over the placement and scale of the map on
the page:

  OUTPUTFORMAT
    NAME pdf
    MIMETYPE "application/x-pdf"
    DRIVER pdf
    FORMATOPTION "PAGE_WIDTH=612"           # (font points)  8.5 inches
wide (72 points per inch)
    FORMATOPTION "PAGE_HEIGHT=792"          # (font points)  11 inches
tall
    FORMATOPTION "MAP_MARGIN_LEFT=144"      # (font points)  2 inches to
the right
    FORMATOPTION "MAP_MARGIN_BOTTOM=144"    # (font points)  2 inches up
from the bottom of the page
    FORMATOPTION "SCALEDENOM=50000"         # 1:50,000 scale when
printed
  END

Here's a sample of the output (using the HARU pdf library):
http://139.142.13.163/Download/Mapserver/topo2_enh_scale3.pdf

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).

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?
Re-implement PDFlib/Haru following "plugin" method of the Cairo
implementation?  Leave them separate for now and see how much PDF-output
interest there is in the Mapserver user community?

Opinions welcome...

Thanks!
Brent Fraser

_______________________________________________
mapserver-dev mailing list
mapserver-dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-dev


More information about the mapserver-dev mailing list