Home

Awesome

electron-pdf

Pdf rendering service with electron

Usage

With Docker:

$ docker run -p 3000:3000 janpot/electron-pdf

Run locally

$ npm i -g electron-prebuilt
$ electron .

API

Endpoints

GET /:url

url: Absolute url to the webpage you want to have rendered.

$ curl http://localhost:3000/https://www.google.com > google.pdf
<hr>

POST /

Send a html string as the request body.

$ curl -L https://www.google.com | curl -X POST -d @- http://localhost:3000/ > google.pdf

Options

Use following request headers to control the output pdf appearance.

Licensing

Released under MIT License