This docker builds a pdf from a url with wkhtmltopdf. You must use it as a web service. Which makes it accessible from anywhere.
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
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'
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
Content type
Image
Digest
Size
204.8 MB
Last updated
over 8 years ago
docker pull vdeapps/wkhtmltopdf