[mapserver-users] get SVG/PDF for one layer

José María Michia jose.maria.michia at gmail.com
Wed Dec 17 04:12:00 EST 2008


Hi all

In a Python script, I hope to get one layer rendered as PDF or SVG.

I'm able to obtain one layer in any other format supported by GD, like
PNG, using:

img = layer.draw(map,img)
img.saveToString()

Or:

img.save(f)

and accessing later to f.

But, if otputformat in mapfile is equal to SVG or PDF, I get errors.

Error obtained using img.saveToString():

msSaveImageBufferGD(): Image handling error. Unknown output image type
driver: svg.

Error obtained using img.write():

_mapscript.MapServerError: imageObj::write: Image handling error.
Writing of svg format not implemented

I've found SVG files in the imagepath. But, i cannot relate these SVG
with layers in the mapfile.

Thanks for any advice.
Saludos
José María


More information about the mapserver-users mailing list