Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

463
Views
Installing wkhtmltopdf on Python 3.6 Alpine

Has anyone been able to install wkhtmltopdf on python:3.6.0-alpine.

I have tried all the solutions present on the internet. I need to use pdfkit which internally uses wkhtmltopython to convert html to pdf.

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

You might need wkhtmltopdf and xvfb to run on a server:

apk add wkhtmltopdf xvfb
over 4 years ago · Santiago Trujillo Report

0

In case someone would like to have the full line that needs to be added to the Dockerfile:

RUN apk update && apk add wkhtmltopdf

or:

RUN apt-get update && apt-get install -y wkhtmltopdf

You can then use the following code in your "Dockerized" Python script:

import pdfkit
path_wkhtmltopdf = '/usr/bin/wkhtmltopdf'
config = pdfkit.configuration(wkhtmltopdf=path_wkhtmltopdf)
pdfkit.from_string(html, '<direction/of/the/report.pdf>', configuration=config)
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!