@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)

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.4.0
    170
    • latest

Version History

Package Sidebar

Install

npm i @ejekanshjain/html-pdf

Weekly Downloads

170

Version

1.4.0

License

MIT

Unpacked Size

16.2 kB

Total Files

14

Last publish

Collaborators

  • ejekanshjain