SVG for print with scale

后端 未结 2 864
时光取名叫无心
时光取名叫无心 2021-01-16 21:42

I have an SVG file representing a flat in my browser and I need to print the output in a specific scale. I\'m using SVG.js to manipulate the SVG content but I can\'t find a

2条回答
  •  盖世英雄少女心
    2021-01-16 21:53

    You should set your width and height parameters in print size, like millimeters for example; and then also you should define viewbox with exactly the same width, height parameters to get exact size on the print output.

    In your case (with roughly 1/50 conversion from pixels to cms):

    
         .....
    
    

    This will provide desired printed output in scale; provided that the printer is set up for 100% scale (and not for "Fit To Page") with correct paper size.

    Scaling can be added as an additional coefficient for different requirements as explained by Paul.

提交回复
热议问题