When I call the following in the command line it works like a charm:
inkscape --with-gui --batch-process --export-filename=- \ --actions="select-all;ObjectToPath" \ /full/path/to/example.svg But when I open Node.js and make the same call in a subprocess like so:
const cp = require("child_process"); var child = cp.spawn( "/usr/bin/inkscape", [ "--with-gui", "--batch-process", "--export-filename=-", '--actions="select-all;ObjectToPath"', "/full/path/to/example.svg", ], { cwd: process.cwd(), detached: true, stdio: "inherit", } ); I get the following error:
Unable to find: "select-all verbs_action: Invalid verb: "select-all Unable to find: ObjectToPath" verbs_action: Invalid verb: ObjectToPath" and the file is returned (printed to stdout) unchanged. Any Idea why the verbs are not found when running Inkscape as a subprocess but not calling it directly from the terminal? I get this same error on ubuntu (20.04) and OSX using the latest Inkscape (1.0.1+r73).