0
votes

I create a SVG image with one rectangle. Attributes width & height units in mm:

    <svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
width="210mm"
height="297mm"
version="1.1">
<rect
    style="opacity:1;fill:none;stroke:#000000;stroke-opacity:1;stroke-width:0.5"
    width="100mm"
    height="100mm"
    x="40mm"
    y="60mm" />
</svg>

Then i convert that SVG with Inkscape and also with Apache Batiks SVG Rasterizer to PDF documents and print it on paper.

In both cases, a few millimeters are missing on the printed paper. The rectangle must be 100mm x 100mm, but it is accurate 97mm x 97mm. The larger the rectangle, the more millimeters missing.

To test my printer, i create a PDF with a PDF editor (Master PDF Editor) and a rectangle of 100mm x 100mm. In this printed PDF the rectangle is very accurate 100mm x 100mm.

How do you get the millimeter from the SVG without loss of size (or profit) on paper?

1
Any improvement if you set the stroke-width to 0mm? Alternatively are you sure you have the margins turned off on your printing software. I know browsers re-scale a PDF that doesn't fit within the margins. - Rob Monhemius

1 Answers

0
votes

Thanks to RMo.

With Master PDF Editor is all ok, also the rectangle from SVG PDF.

Now i set in my PDF reader Okular (at print dialog) the margins to 0. Super, all is OK, the rectangle prints out with 100mm x 100mm.

Master PDF Editor has as default no margins or scalings.

In Gnome Evince, the scaling in the print dialog is set to 0 and everything is fine here as well. There are no margins.