Package Exports
- from-data-to-pdf
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 (from-data-to-pdf) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
from-data-to-pdf
This library converts html files and URL to PDF files or PDF buffer.
Installation
$ npm i from-data-to-pdf
Usage
async function main() {
const listOfSavedPdf = await dataToPdf.getPdfAndSave(
'./temp/',
[
{
name: 'Google',
url: 'https://www.google.com',
options: {}
},
{
name: 'String of html',
text: '<string>',
options: {}
}
]
);
const listOfPdfBuffer = await dataToPdf.getPdf(
[
{
name: 'Google',
url: 'https://www.google.com',
options: {}
},
{
name: 'String of html',
text: '<string>',
options: {}
}
]
);
}
main();