Skip to content

Latest commit

 

History

History
37 lines (16 loc) · 764 Bytes

README.md

File metadata and controls

37 lines (16 loc) · 764 Bytes

html-to-pdf-puppeteer

POC generate pdf from html with puppeteer and express with docker and docker-compose

How to use

Start server

docker-compose up -d

Or Local

node index.js

Try:

http://localhost:3030?url=https://google.com.br&filename=printgoogle.pdf

Params

url: Url to genrate pdf

filename: Filename of download file

width: Width in pixels to pdf (default: 1650)

height: Height in pixcels to pdf (default: 800 )

format: see options on puppeteer_pagepdfoptions (format has priority above width and height)

timeout: timeout to wait page after full load (for wait external async content, like a api request) (default: 3000)