Sign inSign up

mortadaak/puppeteer_api

By mortadaak

•Updated over 5 years ago

Image
0

3.2K

mortadaak/puppeteer_api repository overview

⁠Puppeteer API

This main objective of this project is to provide a way of converting HTML into PDF.

⁠Requirements

  • Node 12.5+

⁠Installation

yarn install

⁠Run

yarn start

This will start the application with port 6000. To change port

PORT=3030 yarn start

⁠Endpoints

Post to /pdf with these params

  • marginLeft: unit (text)
  • marginRight: unit (text)
  • marginTop: unit (text)
  • marginBottom: unit (text)
  • format: type (letter, legal, tabloid, Ledger, A0, A1, A2, A3, A4, A5, A6)
  • printBackground: true
  • headerTemplate: (text)
  • footerTemplate: (text)
  • content: (text)
  • locale: (ar,en)
  • timezone: text (Asia/Riyadh)
  • landscape: boolean (false)

the result will be the PDF binary.

Tag summary

Content type

Image

Digest

Size

239.7 MB

Last updated

over 5 years ago

docker pull mortadaak/puppeteer_api