Closed povpie closed 1 year ago
Problem:10px are being added to the height of the svg
Please upload a simple PDF file I can use to reproduce the problem.
Is there an options to have the resulting svg with px dimensions instead of pt?
No, but you can use option --zoom=-1
to remove the width
and height
attributes which results in an SVG that automatically adapts its size to the available space.
I noted that the
height
attribute and theviewbox(height)
usually gets converted to a strange approximation of the rounded/correct number. In the exemple below it get the value of809.999993pt
instead of810pt
, but the width is the correct 810pt
Just use option --precision
to reduce the number of decimal places, e.g. --precision=2
(or shorter: -d2
).
The computation of the PDF mediabox was buggy. I've fixed it with the upcoming patch.
Problem:10px are being added to the height of the svg
Here is a simple example (the problem is happening in all my conversions pdf to svg). The problem seems to arise because of the
viewbox
attribute formin-y
is not zero (in the screenshot below it has value of =7.920007pt, but should be zero) command I'm using:dvisvgm --pdf -Oall -fwoff2
Additional question: (2) Is there an options to have the resulting svg with px dimensions instead of pt? I use the svg for display and not for printing. (3) I noted that the
height
attribute and theviewbox(height)
usually gets converted to a strange approximation of the rounded/correct number. In the exemple below it get the value of809.999993pt
instead of810pt
, but the width is the correct 810pt(svg with an overflown shape at the bottom but the same non-zero
min-y
problem)