7
vane
5y

Sure you can specify svg object attributes x, y, width and height in metric values like mm and after put things on paper get same printed output but if you want to transform svg object you need to calculate new values by yourself cause you can’t simply provide translate (10mm, 10mm).

Now I ended up with manually converting values to mm.

Making free transform tool for exact document data rendering inside browser is pain in the ass.

I started to wonder how google docs or microsoft word for web deal with this stuff.

Comments
  • 1
    I just wrote my own engine that spits it out in whatever output I need, it's pretty simple once you realize it can just be a bi-directional graph, great write-up about it also here: https://medium.com/@alexgolec/...
  • 1
    @JoshBent nice article but still if they already rendered my units in browser they can compute and store some ratio somewhere and also add ability to use it. ex. as propery svg.mm = 2.54px
    Now I need to calculate that ratio from units that browser calculated and then calculate conversion to my units instead of simply multiplying by ratio.
Add Comment