[mapserver-users] Cairo SVG PDF output
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@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Cairo SVG PDF output
Hi, It feels like it could be useful to have for example something like FORMATOPTION DPI=xxx that could be used when defining PDF outputformat http://www.mapserver.org/mapfile/outputformat.html#outputformat I am not sure what GDAL configuration option GDAL_PDF_DPI is doing but perhaps it is something equivalent. http://www.gdal.org/frmt_pdf.html -Jukka Rahkonen- Christy Nieman 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@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Cairo SVG PDF output
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 cnie...@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@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users