1.0.3 • Published 7 months ago

@asaje/pdf-generator v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

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 },
  });
}
1.0.3

7 months ago

1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago