2

I noticed that in Adobe CS6 there is still no way to import *.svg files into Adobe InDesign and Photoshop.

Now I want to use a lot of svg's from "TheNounProject", due to their high quality and visual consistency. But part of it is also to "play around" with them, basically to find the most suitable image for the accompanying text. To do that I already have to download a lot of svg's that I might not use.

I don't want to also have to manually (1 by 1) export all of them to *.eps (assuming that's the only way) when I later won't use them. And: It seems that there is still no import option for SVG in InDesign and while there is the "SCAND SVG Kit 1.0.8 for Adobe Creative Suite", it doesn't work with CS6 (I tried it).

Plus it somehow beats the purpose of the open and free SVG format when I have to pay $99 for a licence of something that should be included or possible with another software. The publications I use "TheNounProject" icons for are "non-profit" anyways.

Is there any other work-around? Or is there an easy way to add batch-support for InkScape?

(A way that - if it's by commandline - does make it easy for me as a non-IT/math-nerd to precisely understand (where and how) the batch processing script will run on those files.)

I also posted this question on Quora. (Under the title "Why does Adobe InDesign still not support the placement (import) of SVG's (in CS6)?", I can't use more than two hyperlinks here.)

1

2 Answers 2

0

For Windows non-command line, check out InkscapeBatch. I don't have access to a Windows machine to test it out, but it seems like it would do what you need to do.

2
  • Thanks, that basically looks great! However, upon actually trying it (v.1.30) out I get this error message: dl.dropbox.com/u/16751/inkscape-and-batch.jpg, even though I have installed v.0.48.2 of Inkscape! Jun 26, 2012 at 14:22
  • @grunwald2.0, are you able to do the batch conversion despite the error message? What about if you roll back your Inkscape installation to the .47 version? Again, sorry I don't have access to a Windows machine, so I can't help you much with this error message. Jun 26, 2012 at 15:18
0

The command

inkscape -T --export-type=eps file1.svg file2.svg fileN.svg ...

  • -T : Convert Text to Paths (optional but recomended)
  • --export-type=eps : Export to .eps (inkscape --help for a list of other filetypes you can export to)

Protip: you can spesify multiple export formats! e.g. --export-type=png,eps,pdf

Batch process an entire folder

Linux

find . -name "*.svg" -print0 | xargs -0 -P0 inkscape -T --export-type=eps

This is going to very very fast compared to the windows version becuse the inkscape command can take inksape file1 file2 file3 which xargs will do by default.

This should also be paralizable, hence the -P0

IDK if inkscape can nativly deal with globs in linux (it doesn't work in DOS) but if you have a modern shell it shouldn't matter, in which case you can just do:

inkscape -T --export-type=eps *.svg

Windows

For windows the fastest way to get an entire folder processed would be:

C:\my\work\folder\> forfiles /M "*.svg" /C "cmd /C inkscape -T --export-type=eps @name"

Protip: You can also use the /S switch on the forfiles /S ... to traverse subdirectories in the work folder

Protip: You can use /P C:\another\path like: forfiles /P C:\another\path ... to work in a completly diffrent directory.

You can use forfiles /? for more info.

This is slow.

It creates a process for Every. Single. File.

If you need speed, investigate a way to list out all the files in the directory in a arg compatible way.

i.e. arg1 arg2 arg3 "arg with space" arg5 argN

Full walk-through (Windows)

If you're a non-IT/math-nerd this should walk you through setting up and running inkscape in the command line!

Is inkscape in the PATH?

First we need to see if your computer knows where to find the inkscape program. Your computer knows where to find it by using a special global configuration variable (called the PATH variable) to know where to look for program binaries like inkscape.

I think inkscape is suppposed to add itself to the system PATH but it didn't do that for me so let's check it!

  1. In yout windows start-menu start typeing cmd

  2. Click on the Command Prompt application

    This should open the CMD prompt window

  3. Type inkscape --help and then press enter

    You should see a big block of text that describes using inkscape from the command line.

inkscape --help

You can skip to the Open a command window in your working directory section

If you see:

'inkscape' is not recognized as an internal or external command,
operable program or batch file.

Inkscape is not in your PATH

Please follow the next section.

Adding inkscape to your PATH

If inkscape is not in your PATH we need to add it so the comand prompter can find it.

Find out where inkscape is installed

  1. In the start menu start typing inkscape

  2. Right Click on the Inscape application and click on the "Open File Location"

  3. You should see two shortcuts

    Right click on the Inkscape Shortcut and clck on "Open File Location"

  4. Copy the directory

    In the file explorer, click on the browser bar and copy the highlighted directory path

copy the directory from the browser bar

Add inkscape's application location to the path

  1. Open the System Environment setting

    In your start menu start typing env

    Click on the shortcut to "Edit System Environment Variables"

go-to "Edit System Environment Variables"

  1. Clck on the "Environment Variable..." button

  2. Under the System Variables section find the PATH variable

  3. Click "Edit..."

  4. Click "New"

  5. Paste the directory from the previous section into the new item.

  6. Click OK

  7. Click OK

  8. Click OK

the PATH variable

Please close any open CMD prompt windows (the PATH will not auto update)

Go back to the 'Is inkscape in the PATH?' section

Open a command window in your working directory

Working in the command line is very powerfull but there are no safety gaurd rails. There is no Undo and there is no Recycle Bin. Things are permanant.

I recomend copying the folder with your work to a seprate folder and then running commands in that work folder.

I will be using C:\workdir but you can use anywhere that is convenint for you.

  1. Open a command window in your work folder.

    In the file explorer (in your work folder), type cmd and then enter in the browser bar.

browser bar cmd

  1. Verify your command session is in the correct directory.

    You should see something like this:

cmd in workdir

Run the commands

There we go!

You should now be set up to run the commands mentioned above.

If you only want to export certain files you can use this form:

Type inkscape -T --export-type=eps with all the files you'd like to convert.

e.g. inkscape -T --export-type=eps file1.svg file2.svg

Protip: you can press the TAB key at the end of the command to cycle through the files in the directory

If you want to export every file in the folder you can use:

forfiles /M "*.svg" /C "cmd /C inkscape -T --export-type=eps @name

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.