Closed baktiaditya closed 5 years ago
That's because SVG units are pixels (unless specified otherwise) and PDF units are points. 24 px are equal to 18 pt.
You can use the {assumePt: true}
option that converts pixels to pdf points without scaling, or specify the unit in the svg width and height: <svg xmlns="http://www.w3.org/2000/svg" width="24pt" height="24pt" viewBox="0 0 24 24">
I have 24px x 24px svg icon, when i generate the pdf it looks like
<rect width="24" height="24" />
is not retained, it becomes 18px x 18px when i import to xcode.svg string:
how to retain the
<rect width="24" height="24" />
tag? thank you