Questions tagged [django-wkhtmltopdf]
31 questions
4
votes
0 answers
Ubuntu: QXcbConnection: Could not connect to display Could not connect to any X display
OS Error
wkhtmltopdf exited with non-zero code 1. error:
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
qt.qpa.screen: QXcbConnection: Could not connect to display
Could not connect to any X display.

Sumith Tatipally
- 41
- 3
4
votes
2 answers
How to get WKHTMLTOPDF working on Heroku?
I created a website which generates PDF using PDFKIT and I know how to install and setup environment variable path on Window. I managed to deploy my first website on Heroku but now I'm getting error "No wkhtmltopdf executable found: "b''" When…

Michael Berger
- 67
- 2
- 5
3
votes
0 answers
How to make wkhtmltopdf work on Google Colab?
I need to use pdfkit on Google Colab but I'm not able to make it works.
(I already use it on jupyter notebook on windows 10 withtout problem)
I tried installing like this:
! wget…
user14333141
3
votes
2 answers
Python wkhtmltopdf can't import module
I am using Python version 3.6, Django version 1.9 and wkhtmltopdf version 0.2. My Python is not GCC it's Anaconda3.
When running my project which uses wkhtmltopdf, following error will be thrown:
from main import WKhtmlToPdf,…
user9088612
2
votes
1 answer
Saving PDFs to disk as they are generated with django-wkhtmltopdf
What I'm trying to implement is this:
User sends query parameters from React FE microservice to the Django BE microservice.
URI is something like /api/reports?startingPage=12&dataView=Region
These PDFs are way too big to be generated in FE, so…

cjones
- 8,384
- 17
- 81
- 175
2
votes
0 answers
wkhtmltopdf Exit with code 1 due to network error: HostNotFoundError
I'm running wkhtmltopdf 0.12.1.4 (with patched qt) from a Django application using django-wkhtmltopdf. On my PC it is running fine, but when I load onto a DigitalOcean VPS it is generating the following error.
Command '['/usr/bin/wkhtmltopdf',…

HenryM
- 5,557
- 7
- 49
- 105
2
votes
0 answers
wkhtmltopdf get CalledProcessError under uwsgi environment
I get a CalledProcessError under uwsgi environment, while I can run it in django normal runserver-mode ,and can run this command directly in command line correctly. here is my environment:
Environment:
Request Method: GET
Request URL:…

Def_Zheng
- 21
- 1
1
vote
1 answer
"Error - Wkhtmltopdf failed (error code: -11). Memory limit too low or maximum file number of subprocess reached."
I am working on an Odoo project where I need to generate PDF reports for 10 000 records. When I try to print a report with a high number of records, I encounter the following error:
Wkhtmltopdf failed (error code: -11). Memory limit too low or…

Abhin k
- 21
- 2
1
vote
0 answers
wkhtmltopdf reported an error: Exit with code 1 due to network error: ContentNotFoundError
good day, please im having this error when i click Export to pdf button…………………
‘’’
views.py
@login_required(login_url='loginpage')
@cache_control(no_cache=True, must_rev alidate=True, no_store=True)
def exportToPdf(request,…

Azeez Soliudeen
- 29
- 4
1
vote
1 answer
Python Flask WkHTMLtoPDF not loading local CSS and files
I am getting the following error, despite adding the appropriate options
rendered= render_template('data.html', data=data)
options = {'enable-local-file-access' : True}
pdf =…

jabacif.mosequf
- 31
- 3
1
vote
0 answers
Generating highly customized dynamic PDF file
I have a requirement to generate a report in PDF format. The report is having some graphics (graphs, charts, etc). All of these dynamics - value of graph and charts will change based on the user input.
Currently I another similar working thing using…

Umair Mohammad
- 4,489
- 2
- 20
- 34
1
vote
1 answer
how to use custom variables in header/footer wkhtmltopdf for django?
I'm trying to convert html files into pdf using django-wkhtmltopdf. But I'm unable to use custom variables with header and footer because I didn't find the exact synatax or correct implementation and also I'm not able to use cover page in…

Divyansh
- 61
- 6
1
vote
0 answers
Wkhtmltopdf renders different on two Ubuntu's
I use wkhtmltopdf (in fact django-wkhtmltopdf) to generate PDF.
I have to use xvfb because we need to run it on production server Ubuntu 16.04 too.
The problem is that for example tables have different sizes on production and on development server…

Milano
- 18,048
- 37
- 153
- 353
1
vote
0 answers
Converting D3 charts to pdf using wkhtmltopdf
I have several D3 charts, one a basic Heat Map and the others things like Donut Chart or Bar Chart. The Pie, Donut and Bar charts will all show in a PDF when using wkhtmltopdf, but my Heat Map will not. I cannot understand why not.
Here is a…

HenryM
- 5,557
- 7
- 49
- 105
1
vote
0 answers
django-wkhtmltopdf with AJAX requests will get 403 Forbidden
Description
I want to generate a PDF file from Django view, so I'm using django-wkhtmltopdf app, the app is working but my template (that is used in the view) has many AJAX requests using jQuery. Views that requested by AJAX requests are protected…

Emad Mokhtar
- 3,237
- 5
- 31
- 49