user1580348
user1580348

Reputation: 6043

How to get optimal result when converting SVG to PDF with ImageMagick?

In Windows 10, I use ImageMagick-7.0.10-Q16. When I execute this command-line:

magick clocky.svg test.pdf

... then I get a PDF where the image in the PDF is very pixelated:

enter image description here

This is the source SVG image: https://svgshare.com/s/V0f

How can I get an optimal result when converting SVG to PDF without pixelation with ImageMagick?

Isn't there a way to include the SVG natively in the PDF, so the image in the PDF looks always smooth at all zoom values? (Like it is obviously done by Inkscape when saving an SVG to PDF).

Upvotes: 1

Views: 965

Answers (1)

fmw42
fmw42

Reputation: 53081

In ImageMagick, you would specify a density before reading the SVG and then resize afterwards. So

magick -density 288 clocky.svg -resize 25% test.pdf

288=4*72 so we resize by 1/4=25%

Upvotes: 3

Related Questions