@asaje/pdf-generator
v1.0.3
Published
Easy pdf generator from HTML based on puppeteer.
Downloads
4
Readme
pdf-generator
Easy pdf generator from HTML based on puppeteer.
Installation
npm i @asaje/pdf-generator
or
yarn add @asaje/pdf-generator
Usage
import { generatePdf, PrintPdfOptions } from '@asaje/pdf-generator';
async function generate(data: { html: string; options: PrintPdfOptions }) {
const path = randomUUID() + '.pdf';
const pdfBuffer = await generatePdf({
html: data.html,
options: { ...data.options, path },
});
}