convertsvg2pdf
v1.0.3
Published
Convert all your pdf files to svg using inkscape! You need to add the folder where the inkscape executable (not the shortcut) is located to your PATH or environment variables, but more than anything else you need to add the bin folder.
Downloads
1
Readme
pdftosvg
Convert all your pdf files to svg using inkscape! You need to add the folder where the inkscape executable (not the shortcut) is located to your PATH or environment variables, but more than anything else you need to add the bin folder.
IMPORTANT
You need install the libraries
npm i child_process fs path pdf-lib
and inkscape on the official website
API Reference
How to use
//for split
(async () => {
await splitPdf("./test.pdf", "<ANY-OUTPUT>");
})();
//for convert archives
const { exportpdftosvg } = require("convertsvg2pdf/src/convert");
exportpdftosvg("./pdfs/","./svgs/")
| Parameter | Type | Description |
| :-------- | :------- |:------- |
| splitPdf
| string
string
| Separates the pdf file into the number of pages of the file and stores them in the folder for later conversion. |
| exportpdftosvg
| string
string
| Using the above function get the address of the pages of your main pdf and put it in the first value of the function then in the second value put the output of the svg files, remember that a conversion of each page will be done separately. |