What is the command for inkscape (called from the terminal) to convert graphics to greyscale? I was not able to find in in the manual. I use the following command:

inkscape -f drawing1.pdf -A grawing2.pdf

1 Answer 1


Inkscape natively works with svgs. As far as I'm aware, even if you import a pdf it converts it to svg for editing. To avoid the popup window when importing a pdf you have to convert to svg. To do this install pdftosvg and run

pdf2svg inputfile.pdf outputfile.svg

To convert to greyscale in Inkscape you have to use Inkscape Verbs. This command worked for me:

inkscape -f inputfile.svg --verb EditSelectAll --verb org.inkscape.color.desaturate.noprefs --verb FileSave --verb FileQuit

A full list of Verbs can be found by running inkscape --verb-list

Unfortunately Inkscape doesn't have any command-line options aside from basic conversion from svg to png, so Verbs, which results in the window opening, is the only way to do it.

  • 1
    Yes, this works flawlessly on svg files, but gives prompts on pdf files, and I have to do dozens of files this way. As well, the windows open which is annoying.
    – yo'
    Sep 22, 2012 at 12:43
  • Unfortunately Inkscape doesn't have any terminal commands besides basic conversion of files between svg and png. Aside from writing a script in Python - which I have no experience of doing - Verbs are the only way to do this. To see a list of command-line options run "man Inkscape". Sep 22, 2012 at 13:00
  • Regarding pdfs, Inkscape natively only uses SVG, so to avoid having the window pop up you'll have to convert the pdfs to svgs. I've updated the answer to include instructions on this Sep 22, 2012 at 13:01
  • I found that inkscape is not a good option, whatever you do, it modifies the dimensions of the images slightly, which is a 100% no-no for me. Thanks for the answer anyways!
    – yo'
    Oct 24, 2012 at 17:52
  • Oh no, that's a shame! You should submit a bug report about it Oct 27, 2012 at 22:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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