Checkout my new Django Course!
Introduction to my next video on user django to render HTML templates in PDF format.
Source code:
XHTML2PDF Documentation:…(read more)
Convert Word 2 PDF: Word to PDF Converter
Convert PowerPoint 2 PDF: PPT to PDF Converter
Convert Excel 2 PDF: Excel to PDF Converter
Convert an Image 2 PDF: Image to PDF Converter
Convert HTML 2 PDF: HTML to PDF Converter
More Tools: PDF Converter
Excellent video, thank you so much Dennis!
What about the diacritics? When the HTML contains letters like ă,î,ș,ț,â I get this error:
UnicodeEncodeError
'latin-1' codec can't encode characters in position 405-409: ordinal not in range(256)
Hi, how can you render an image in the pdf?
does not support other languages I got something like Date: ■■■■■■ ■■■■
Amount: ■■■■■■■ ■■■
Bill to: ■■■■■■■ ■■■■■■■ ■■■ ■■■ any help please
Thanks for overview! My actual css styles doesn't work despite i provide a function for 'link_callback' variable to define the path of css file which used in my template. Also i check this path and it's correct. But css styles doesn't work.
Did you every actually make the HTML to PDF video u mentioned at the end??
Hello Dennis.
I got a problem with polish letters like: ą, Ó or ż.
When i try original code:
encode("ISO-8859-1")
'latin-1' codec can't encode characters in position 929-938: ordinal not in range(256)
Just as I expected.
Bur when i change encode to: "ISO-8859-2" or "utf8" or "windows-1250 "
in exchange i receive for example:
¥¹ÊêÆ棳ÑñÓóœ■Ÿ¯
Any advice?
The view button works perfectly for me but the download button is downloading a file of an unknown type. Thanks for the video 🙂
men por que hacen esto así mucho código engorroso toca ir a buscar una manera mejor mas corta importan de todos lados y algunas cosas no las muestras
Html won't use external css render to pdf?
Any fix available?
What if we use pagination, is it real to print all the pages on pdf?
That works OK!! Thanks Dennis. I cant figure out how to attach the generated pdf to an email in order to send it . Anyone dealt with this? I would appreciate any help on this!
How to display model object images in pdf?
some syntax error, downloaded pdf has ' ' attached to it.
Hi Dennis – great video, thanks for doing it. I tried using this code within an admin action to create pdfs 'with selected items..' but I can only download a pdf for the last item in the action's queryset. Have you any plans, or would you be interested, in doing a video for creating and downloading pdfs from an admin action?
I want to create a multipage pdf with paragraph and table content. And the table may expand in rows thus making it multiple pages or a single page. I while doing this i also want to preserve the Header and Footer (both images). And I also want the liberty to be able to change the paper size. Default paper size = A4.
Django + React
is there something like html2image or render_to_image, i want to render template to a image file and send via telegram api
Excellent work !!! Need one help.
<div id="header_content">
<img src='logo.png' alt='Girl in a jacket' width='100' height='100'>
<h2>test</h2>
</div>
Logo File is not able to see in the pdf, created a issue in git
Thanks exactly what I am looking for.
Спасибо бро
Getting "unknown encoding: ISO-8859-1". PLZ HELP
Can you please add requirements.txt to your django projects?
it's not working in any other language!!
Thank you Sir. It's work.