Advertisement


Export multiple SVG files generated with Inkscape to multiple PDF files


Question

I have around 150 SVG files created in Inkscape. Is there is a utility that can export all of these to multiple PDF or PNG files?

Exporting individually is too time consuming, so I was wondering if I could do it in a batch with some utility/software.

Windows preferred.

2017/01/19
1
9
1/19/2017 12:25:00 AM

Accepted Answer

Some other options tools to convert to/from SVG from the Inkscape Wiki:

2012/06/19
6
6/19/2012 9:50:00 PM

For people who landed here from a google search because this question references Inkscape but isn't tagged with Windows, here's a complete howto for Linux (this assumes you have Inkscape installed on your system - tested on Ubunut 14.04 with Inkscape 0.91).

Create a file in the directory where you want to convert your SVGs to PDFs. (I used gedit below but you might as well replace it the text editor of your choice)

gedit convertSVGtoPDF.sh

Paste the following code inside

#!/bin/bash
mkdir "$PWD"/pdf
for file in $PWD/*.svg
    do
        filename=$(basename "$file")
        inkscape "$file" -d 1200 -A "$PWD"/pdf/"${filename%.svg}.pdf"
    done

You can tweak the desired output resolution by modifying the value after the option -d.

Save the file.

Now make this script executable

sudo chmod +x convertSVGtoPDF.sh

And execute it inside your directory containing the SVGs

./convertSVGtoPDF.sh

This will create a new folder called pdf where you can find your PDFs with embedded fonts.

Happy Inkscaping!

2018/07/25