[mapserver-dev] pdf output development?
Brent Fraser
bfraser at geoanalytic.com
Wed Jan 7 12:49:16 EST 2009
Ned Harding wrote:
> 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.
>
Ned,
Interesting. You could use Mapserver's C functions directly along with Haru's C api (when the Haru-based pdf rendering code gets into mainstream Mapserver). You'd likely need to change Mapserver's msImageCreatePDF function to do a HPDF_GetCurrentPage (your page) instead of a HPDF_AddPage. Hmm, or maybe we could have msImageCreatePDF try a HPDF_GetCurrentPage then if there is no current page, do a HPDF_AddPage. That would be cool.
I had planned to use Mapserver's Python Mapscript along with ReportLab to programatically create maps for printing. It would require a save by Mapscript and a PDF load by ReportLab unless some data stream magic could be done..
Brent
More information about the mapserver-dev
mailing list