
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
inkscape-cli
Advanced tools
inkscape-cli is a Node.js binding for Inkscape's command line interface. You need to have Inkscape installed to your computer. Furthermore, inkscape-cli is designed for Windows. Other platforms may not work well.
Github: https://github.com/The3DSquare/inkscape-cli
NPM: https://www.npmjs.com/package/inkscape-cli
Import the library into your code and start coding!
const I = require('inkscape-cli');
const save_as_pdf = I.generate_command([
I.O.file('.\\File.svg'),
I.O.export_area_page,
I.O.export_pdf('.\\File.pdf')
]);
I.run_command(save_as_pdf);
Tells inkscape-cli that inkscape.exe is in the folder specified by path.
| param | type | description |
|---|---|---|
| path | String | Path to Inkscape's folder |
I.inkscape_folder("C:\\Program Files\\Inkscape\\");
\\ instead of /inkscape-cli has an object called O. O has all the options one can use when creating a command with generateCommand. Go to https://inkscape.org/doc/inkscape-man.html for specific details about each command.
Here are some examples:
I.O.file('.\\File.svg');
I.O.export_area_drawing;
I.O.export_png('.\\File Image.png');
File paths need to use \\ instead of /. Feel free to leave spaces in a filepath as well.
Options with no parameter can be left without (). Options that do need parameters can put them in via a function call.
Generates a command inkscape-cli can run.
| param | type | description |
|---|---|---|
| args | Array | An array of I.O. values |
const savePDF = I.generateCommand([
I.O.file('.\\File.svg'),
I.O.export_area_page,
I.O.export_pdf('.\\File.pdf')
]);
const savePNG = I.generateCommand([
I.O.file('.\\File.svg'),
I.O.export_area_drawing,
I.O.export_width(2024),
I.O.export_height(1024),
I.O.export_png('.\\File.png')
]);
Runs a command generated by generateCommand
| param | type | description |
|---|---|---|
| command | String | A command created by generateCommand |
I.runCommand(savePDF);
Runs multiple commands one at a time
| param | type | description |
|---|---|---|
| commands | Array<String> | Array of commands created by generateCommand |
I.chainCommands([savePDF, savePNG]);
FAQs
Bindings for Inkscape's command line interface
We found that inkscape-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.