Questions tagged [django-wkhtmltopdf]
31 questions
1
vote
1 answer
Subprocess error in wkhtmltopdf in a docker environment
Getting the error below when I try to run wkhtmltopdf in a docker environment.
subprocess.CalledProcessError: Command '['wkhtmltopdf', '--encoding', 'utf8', '--margin-top', '10', '--quiet', '/tmp/wkhtmltopdf85qv7fvc.html', '-']' died with…

lukik
- 3,919
- 6
- 46
- 89
0
votes
0 answers
pdf report creation using pdfkit python django
I am creating pdf report using pdfkit 0.6.1 and from_url method in django 4 python
but the problem on my local system pdf is creating as I required but when i am pushing code on production server it is creating pdf like this:
pdf content is not…
0
votes
0 answers
django-wkhtmltopdf not loading apex charts
I'm working on a project where I need to export some reports about a certain entity, using wkhtmltopdf with an html template that includes some charts from ApexCharts.js. The charts load fine in a rendered html but not in the pdf generated. Here's a…

Farhan
- 39
- 5
0
votes
2 answers
How to use static image as watermark for every page when printing pdf using django-wkhtmltopdf
I need to be able to use a static image as watermark when printing a pdf from a django template using django-wkhtmltopdf.
I was trying using the following code, but the document has several pages and the background does not apply to every page…

Ernesto Ruiz
- 736
- 9
- 31
0
votes
0 answers
How to print leaflet map in pdf using django-wkhtmltopdf?
I have a django app I am trying to print a leaflet map in pdf using django-wkhtmltopdf, but the map is not rendering correctly. I even try to give more time to the 'javascript-delay' parameter but is giving me the same result.
Here is the image of…

Ernesto Ruiz
- 736
- 9
- 31
0
votes
0 answers
Export an html to PDF in Django application with charts
I have a Django application, and I want to provide 'export to pdf' functionality on all pages, (Note: all pages have images).
I saw multiple tutorials on the topic, there are two ways: either write your pdf on your own or provide an HTML file path…

Amir saleem
- 1,404
- 1
- 8
- 11
0
votes
0 answers
Python3 pdfkit issue in generating pdf
Im using python3 pdfkit to convert html to pdf .
When using macbook , CSS (Bootstrap 5) are not applied properly while generating pdf but the same works fine in ubuntu .
is there any issue with MAC OS ? im using MacOS Big Sur Version11.4
Thanks in…

PremKumarR
- 461
- 1
- 6
- 19
0
votes
0 answers
Django: How i can delete the white space between the background image and the origin page also Page number appear (Page undefined of undefined)
Am still learning on Django and wkhtml2pdf using and I need some help please, I have searched and try much solutions but they don't work with me, I want to set a background image and page number in the footer(I Have use wkhtml2pdf library):
Here…

Helena Perroni
- 63
- 10
0
votes
1 answer
Django wkhtmltopdf loading stuck
same issue. Just checking if it has been solved.
More context:
I'm using django-wkhtmltopdf 3.3.0
and wkhtmltopdf 0.12.5 (with patched qt) on ubuntu.
options = {
'title': "PDF Title",
'page-size': 'A4',
'orientation': 'portrait',
…

Neshy
- 41
- 5
0
votes
1 answer
How to use wkHTMLtoPDF running in docker-compose in Django application
I have a problem with undestanding on how to use wkHTMltoPDF, that I run in docker-compose and Django. Also I can't understand how to setup it in Django and use it in the right way. I will be very glad for any help.
My docker-compose.yml:
version:…

10k20
- 137
- 2
- 16
0
votes
0 answers
Django-wkhtmltopdf crashes on server
I have an app using django-wkhtmltopdf. It is working locally, but when I run on a VPS I'm getting the following error.
Command '['wkhtmltopdf', '--allow', 'True',
'--enable-local-file-access', '--encoding', 'utf8',
'--javascript-delay',…

HenryM
- 5,557
- 7
- 49
- 105
0
votes
1 answer
python pdfkit doesn't render cover
I am using pdfkit to create pdf from html string.
Here is my code:
cover = ' hello
hello '
body = " hello "
pdf = dfkit.from_string(body, False, cover=cover,…
hello "
pdf = dfkit.from_string(body, False, cover=cover,…

Aj1
- 953
- 2
- 15
- 42
0
votes
2 answers
Django - wkhmltopdf - CalledProcessError (only works with sudo from command line)
I'm trying to render PDF from Django template using django-wkhtmltopdf. The problem is that wkhtmltopdf started raising:
Command '['/usr/bin/wkhtmltopdf', '--encoding', u'utf8', '--quiet', u'False', '/tmp/wkhtmltopdfRDyi61.html', '-']' returned…

Milano
- 18,048
- 37
- 153
- 353
0
votes
1 answer
wkhtmltopdf exclude css files from PDF but show in HTML
I was working with wkhmtltopdf and found that I have a problem with it.
I am using the html page to also preview the content in a browser prior to converting to PDF.
But to make it more readable in my preview, I have added some css on the page: (In…

Igoranze
- 1,506
- 13
- 35
0
votes
0 answers
Django on Apache2, django-wkhtmltopdf without celery run shell subprocess
In the past in order to make any os binary calls from Django over WSGI on Apache2 with a Debian server, I've had to use celeryd to queue the message, open a subprocess (Apache2 would not create a new child process for security reasons, but maybe…

Furbeenator
- 8,106
- 4
- 46
- 54