J
J
JonGalt2017-06-22 16:07:33
Django
JonGalt, 2017-06-22 16:07:33

PDF generation in django?

I'm trying to generate a PDF file with django. I am using the wkhtmltopdf library.
Gives an error:
No such file or directory: 'wkhtmltopdf'
Who faced?
I work in a virtual environment. Tried to manually set the path in setting
WKHTMLTOPDF_CMD = '/home/PycharmProjects/stroyka-v.5/env/lib/python3.5/site-packages/wkhtmltopdf'
same error.
Can you suggest another library. I tried xhtml2pdf, but it has problems with Cyrillic.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Eugene, 2017-06-22
@immaculate

Wherever possible, I refused to manually generate PDF. I make neat styles, and PDF generation is already done using the browser (printing to PDF, or printing right away, bypassing the PDF version). Where you need not exactly a PDF, but just a printable representation, it is better to use this approach.

U
User23, 2017-06-22
@User23

try weasyprint.org , it works fine for us

D
devel787, 2017-06-26
@devel787

There is also https://github.com/arachnys/athenapdf

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question