[mapserver-users] Cairo SVG & PDF output

Christy Nieman cnieman at dmsolutions.ca
Wed Oct 3 15:25:06 PDT 2012


Thanks for confirming that it's a bug, Thomas.  I created an issue in githb: https://github.com/mapserver/mapserver/issues/4487

Christy

On 2012-10-03, at 1:33 PM, thomas bonfort wrote:

> 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