2

I use rsvg-convert to convert SVG to PDF (works great, also with huge files).

SVG file is scalable and internally i use mm unit, so if document is 1200x1500 for me it is 1.2m wide and 1.5m long.

RSVG creates PDF document with paper size 423x529mm (if width/height args used 2400x3000 -> 846x1058), so there is some constant ~2.3868 i have to multiply width/height to get right paper size. But not exactly same fo X and Y, 1200/423 != 1500/529 (maybe i see paper size rounded to int).

What is this constant? I tried different DPI, but it seems, it is not related with this.

My convert command is simple

rsvg-convert -f pdf -o test.pdf test.svg
opio
  • 303
  • 1
  • 13
  • that constant is around 2.83464 and same for x/y. Found it using identify -verbose test.pdf and paper size in inches. – opio Sep 09 '17 at 10:49
  • have two debian installation (8.9) with same rsvg-convert (2.40.5) and libcairo2 (1.14.0-2.1+deb8u2) but on them constant is different – opio Sep 09 '17 at 11:11
  • 1
    probably it's directly from your X system. Try `xdpyinfo | grep dimensions` or `xrandr | grep ' connected'` to query resolution and screen sizes as known to the system (on my system they interestingly give different physical screen sizes). – ccprog Sep 09 '17 at 16:23

0 Answers0