3

I tried to run inkscape shell mode by writing these lines in a .bat file:

inkscape --shell
>2.svg -e 2.png
But it doesn't work at all (no png files), more over I tried to open the current svg input and I found it damaged and I failed to open it at all. Could any one please tell me the right command lines to enter the SHELL mode and execute other inkscape command lines.

loll
  • 241
  • 3
  • 6
  • 14

2 Answers2

4

You're redirecting output, using the >, to 2.svg. > means redirect output to this file.

Probably more correct would be:

rem echo the commands you want to execute to a file
echo 2.svg -e 2.png > commands.txt
echo quit >> commands.txt
inkscape --shell < commands.txt

not sure if this works because I don't use windows.

Joey
  • 344,408
  • 85
  • 689
  • 683
SiggyF
  • 22,088
  • 8
  • 43
  • 57
  • HI,Finally I could work with shell mode, Just by downloading the last version of inkscape, THANKS you ALL. – loll Oct 14 '10 at 11:51
  • 1
    This option is really limited, many `verbs` are not supported and require a GUI. So totally contra-productive with the goal of `--shell` – Édouard Lopez Oct 26 '14 at 16:40
-2

Exporting SVG to different formats

  • export to bitmap (png)

    inkscape -f FILENAME.svg -e FILENAME.png

    loads FILENAME.svg and exports it to FILENAME.png

    inkscape -f FILENAME.svg -w WIDTH -h HEIGHT -e FILENAME.png

    loads FILENAME.svg and exports it to FILENAME.png with width size, WIDTH, and height size, HEIGHT, in pixels

  • export to pdf

    inkscape -f FILENAME.svg -A FILENAME.pdf

    loads FILENAME.svg and exports it to FILENAME.pdf

  • export to ps

    inkscape -f FILENAME.svg -P FILENAME.ps

    loads FILENAME.svg and exports it to FILENAME.ps

  • export to eps

    inkscape -f FILENAME.svg -E FILENAME.eps

    loads FILENAME.svg and exports it to FILENAME.eps

External links:

cuixiping
  • 24,167
  • 8
  • 82
  • 93