Convert HTML into professional-looking images using the html Page option. See Screenshot options for all available options for screenshots.

Example

This example generates a basic image that is 400x200.

import Doczilla from '@doczilla/node'

const doczilla = new Doczilla('<your token>')

const pdf = await doczilla.screenshot.direct({
  page: {
    html: '<div>Your first Doczilla image</div>'
  },
  screenshot: {
    viewport: {
      width: 400,
      height: 200
    }
  }
})

Output