Sign inSign up

vdeapps/wkhtmltopdf

By vdeapps

•Updated over 8 years ago

wkhtmltopdf from a webservice

Image
1

1.6K

vdeapps/wkhtmltopdf repository overview

⁠wkhtmltopdf over API REST

⁠Description

This docker builds a pdf from a url with wkhtmltopdf. You must use it as a web service. Which makes it accessible from anywhere.

⁠Docker compose config

⁠Docker-compose.yml
version: '3'
services:
###########################
# Setup the PHP container
###########################
  vdeapps_wkhtmltopdf:
    image: "vdeapps/wkhtmltopdf:latest"
    container_name: vdeapps_wkhtmltopdf
    env_file:
      - ./docker-compose.env
    ports:
      - 8137:8137
    volumes:
      - ./pdf:/pdf
    restart: always
⁠Docker-compose.env
WK_OPTIONS=--margin-bottom 10 --margin-left 5 --margin-right 5 --margin-top 10 --orientation Portrait --page-size A4 --no-background --disable-external-links --print-media-type --footer-center 'by vdeApps'

⁠by Curl

Use these query params: url= query_params= wk_params=

curl localhost:8137/wk?url=https://www.google.fr&query_params=q%3Ddocker%20config > google.pdf

Tag summary

Content type

Image

Digest

Size

204.8 MB

Last updated

over 8 years ago

docker pull vdeapps/wkhtmltopdf