Transforms PDF to png or html files
npm install pdf-transform
$ node index.js "./manual/PDF_Converter_ReadME.pdf"
`
- Code Snippet:
`javascript
const pdfTransform = require("pdf-transform");
pdfTransform.convert({
fileName: "./manual/PDF_Converter_ReadME.pdf", // Specify PDF file path here
convertTo: "html", // Can be "png" also
});
`
- Output:
`
Finished converting 1 page of PDF file to a PNG image.
Finished converting 2 page of PDF file to a PNG image.
Finished converting 3 page of PDF file to a PNG image.
HTML file created successfully and saved as sample_3.html in html-files folder.
HTML file created successfully and saved as sample_2.html in html-files folder.
HTML file created successfully and saved as sample_1.html in html-files folder.
``