@ejekanshjain/html-pdf
TypeScript icon, indicating that this package has built-in type declarations

1.4.0 • Public • Published

html-pdf

Install this package

npm install @ejekanshjain/html-pdf

Generate pdf

import { writeFile } from 'fs/promises'
import { generatePdf } from '@ejekanshjain/html-pdf'

const html = '<html><body><h1>Hello, World</h1></body></html>'

const pdfBuffer = await generatePdf({
  content: html
})

await writeFile('test.pdf', pdfBuffer)

Package Sidebar

Install

npm i @ejekanshjain/html-pdf

Weekly Downloads

36

Version

1.4.0

License

MIT

Unpacked Size

16.2 kB

Total Files

14

Last publish

Collaborators

  • ejekanshjain