Inkscape command line: Need to convert SVG to eps without filter rasterisation
Asked Answered
E

2

41

I need to convert an SVG to EPS and currently use inkscape to do this.

To convert the SVG using the Inkscape GUI version, I simply open the svg, and "Save As" 'logo.eps', unselecting the "Rasterize filter effects" option.

picture

However, I want to automate this process using the command line. Using

inkscape logo.svg -E logo.eps

works but does not disable filter rasterisation. I have done some research but can't figure out how to do this can anyone provide me the correct command? Thanks

Ewers answered 14/5, 2015 at 16:39 Comment(0)
E
55

The command I had to use to fix this problem was

inkscape in.svg -E out.eps --export-ignore-filters --export-ps-level=3

where in.svg is your image and out.eps is the eps that comes out.

Edit

As suggested by Vladimir in comments, newer versions of inkscape doesn't have -E option, so need to replace it with -o.

Ewers answered 29/5, 2015 at 22:19 Comment(6)
Side note for anyone struggling to get the above working: In and Out both require the absolute path (pwd).Delcine
From Mac OS, I had to run this: /Applications/Inkscape.app/Contents/Resources/bin/inkscape ~/Downloads/logo.svg -E ~/Downloads/logo-out.eps --export-ignore-filters --export-ps-level=3Petaliferous
Cool, this even preserves the text in the input SVG file!Femme
Inkscape v.1.0.2 gives "Unknown option -E" error. I have replaced "-E" with "-o" (output) and it is okay now.Mansur
For Inkscape 1.0.2 (e86c870879, 2021-01-15), I used: inkscape file.svg --export-type=eps file.eps --export-ignore-filters --export-ps-level=3; Otherwise I got Unknown option -EUnsearchable
this command is definitely rasterizing, just not as badlyYeomanry
Z
3

A bit late to the game but google brought me here

Found part of this solution on a website that needed an account. This lets you convert all the files within a folder

for file in *.svg; do inkscape "$file" -E "${file%svg}eps" --export-ignore-filters --export-ps-level=3; done
Zoltai answered 19/5, 2021 at 16:33 Comment(1)
On macOS (at least the old High Sierra) it works like a charm. Thank you.Dunedin

© 2022 - 2024 — McMap. All rights reserved.