Skip to content

Node.js packages for converting SVG into other formats using headless Chromium

License

Notifications You must be signed in to change notification settings

neocotic/convert-svg

Repository files navigation

convert-svg

Build Status Release License

This monorepo contains the following Node.js packages that can convert an SVG into another format using headless Chromium.

These are primarily split up into core packages that support the format-specific packages:

As you can perhaps tell, the format-specific packages follow the below naming convention:

convert-svg-to-<FORMAT>
convert-svg-to-<FORMAT>-cli

Where the first package is intended to be used as a standard library and imported into your own code and the second is intended to be installed and used as a tool via the CLI.

It works by using headless Chromium to take a screenshot of the SVG and outputs the buffer. This does mean that the supported output formats are limited to those supported by that the API for headless Chromium, however, as more formats are added, additional packages can easily be created. The CLI packages are installed with puppeteer which downloads and installs a headless Chromium instance, however, the others only use puppeteer-core which means that a Chromium instance must be provided and connected by the dependant (e.g. using puppeteer or an executable path).

The core packages are not intended for use outside this monorepo and only serve to aid development and maintenance of the other packages.

Explore the above packages to learn more on how to install and use each one.

Bugs

If you have any problems with this package or would like to see changes currently in development, you can do so here.

Contributors

If you want to contribute, you're a legend! Information on how you can do so can be found in CONTRIBUTING.md. We want your suggestions and pull requests!

A list of all contributors can be found in AUTHORS.md.

License

Copyright © 2025 neocotic

See LICENSE.md for more information on our MIT license.

About

Node.js packages for converting SVG into other formats using headless Chromium

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

  •  

Contributors 2

  •  
  •