Package Exports
- pdf-transform
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pdf-transform) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
pdf-transform
Installation
- npm install pdf-transform --save
Purpose
Can convert PDF files to:
- PNG images
- HTML files
Usage
- Command line:
$ node index.js "./manual/PDF_Converter_ReadME.pdf"- Code Snippet:
const pdfTransform = require('pdf-transform');
pdfTransform.convert({
fileName: "./manual/PDF_Converter_ReadME.pdf", // Specify PDF file path here
convertTo: "html:, // Can be "png" also
compress: false // Creates corresponding compressed or uncompressed files.
});
- 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.