Skip to content
This repository was archived by the owner on Oct 11, 2025. It is now read-only.

apptivitypl/html-2-pdf

Repository files navigation

html-2-pdf

Node module that converts HTML to PDF.

Build Status CodeFactor


v0.1.2

Project initialization.


Example usage

import { Html2Pdf } from '@bluewavesolutions/html-2-pdf';

const execute = async () => {
    let html2Pdf = new Html2Pdf();
    return await html2Pdf.convertToBuffer("<div>Hello world!</div>");
}

try {
    execute().then(buffer => {
        console.log(buffer);
    });
} catch(err) {
    console.log(err);
}

Html2Pdf

constructor

Name: launchOptions Type: puppeteer.LaunchOptions Default value: null

convertToFile

Name: inputHtmlPath Type: String

Name: outputPdfPath Type: String

Name: options Type: puppeteer.PDFOptions Default value: null

convertToBuffer

Name: content Type: String

Name: options Type: puppeteer.PDFOptions Default value: null

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 2

  •  
  •