[mapserver-users] Cairo SVG & PDF output

thomas bonfort thomas.bonfort at gmail.com
Wed Oct 3 10:33:52 PDT 2012


Cairo is expecting us to create our canvas with width and height
specified in points, whereas we are providing pixels, so this would be
a bug.

--
thomas

On Wed, Oct 3, 2012 at 7:03 PM, Christy Nieman <cnieman at dmsolutions.ca> wrote:
> Hi all,
>
> I have been looking into something I just noticed when I change the output
> of a map draw from png to Cairo svg or pdf.  A 300px by 300px png image
> became a 375 px by 375 px svg according to Inkscape.  I realized this is
> because the size of the svg was specified in points and Inkscape was
> assuming a dpi of 90 instead of 72.  I tried changing the RESOLUTION
> parameter in my mapfile to 90, but (and I already knew this) changing the
> RESOLUTION value only affects the sizes of features in the map, not the
> output map size.
>
> I edited the svg xml for the size to be in px instead of pt, which seemed to
> make the svg draw the same size as the png in Chrome and Firefox.  Is there
> a way to have the units for cairo output images set to be pixels instead of
> points?  Am I wrong in thinking there is a problem with the way it works
> now?
>
> Thanks,
> Christy
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users



More information about the MapServer-users mailing list