1.0.3 • Published 2 years ago

@haliloncen/html2pdf v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago
npm i @haliloncen/html2pdf
import { createPDF } from '@haliloncen/html2pdf'
// or const { createPDF } = require('@haliloncen/html2pdf')

const html = '<h1>2b || !2b, that is the question</h1>'
const options = {
  window: { width: '1920px', height: '1080px' },
  margin: '32px'
}

// Promise chain
createPDF(html, options)
  .then(pdfBuffer => {...})
  .catch(err => {...})

// Async-await
async function justDoIt() {
  const pdfBuffer = await createPDF(html, options)
}
1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago