JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 21
  • Score
    100M100P100Q35580F
  • License ISC

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'
            },
            {
                name: "String of html",
                text: "<string>"
            }
        ]
    );

    const listOfPdfBuffer = await dataToPdf.getPdf(
        [
            {
                name: "Google",
                url: 'https://www.google.com'
            },
            {
                name: "String of html",
                text: "<string>"
            }
        ]
    );
}
main();