@bluewavesolutions/html-2-pdf
v0.1.2
Published
HTML to PDF converter
Downloads
13
Readme
html-2-pdf
Node module that converts HTML to PDF.
v0.1.1
Project initialization.
Example usage
import { Html2Pdf } from '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