how to Command Line execute SaveFileAs a specific filetype

Discussion about writing code for Inkscape.
onirb
Posts: 2
Joined: Sat Jun 21, 2014 4:52 am

how to Command Line execute SaveFileAs a specific filetype

Postby onirb » Sat Jun 21, 2014 5:13 am

Hi,

I want to convert a svg file in a eps file (with gradiants) via the command line so that i can create a batch file.
The following things I do know:

Prim Andrans wrote a perfect custome eps exporter for Inkscape which exports to eps with gradients nicely
http://primandras.hu/static_page.php?id=3

I do not know how to start this from command line.
Does anyone can help me how to use the commandline to save files with this custom eps exporter?

I have serveral ideas how this could be solved - but I do not know the eact working way

a.) use the verb SaveFileAs and then change the filetype??? - I do not konw how to chage the output file type with the command line

b.) execute the custom python script directly from the command line

Thank you very much for your help
Thomas

User avatar
ragstian
Posts: 1181
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: how to Command Line execute SaveFileAs a specific filety

Postby ragstian » Sat Jun 21, 2014 7:49 am

Hi.

Have a look at Imagemagik, http://www.imagemagick.org/

Imagemagik uses Inkscape and Ghostscript for this conversion.
http://www.imagemagick.org/script/formats.php

RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

onirb
Posts: 2
Joined: Sat Jun 21, 2014 4:52 am

Re: how to Command Line execute SaveFileAs a specific filety

Postby onirb » Sun Jun 22, 2014 9:32 pm

Hi,

Thanks for the tip. But I did have a detailed look at imagemagick before. Unfortunately they write EPS only in raster output and not in vector.

Thomas


Return to “Programming”