You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is this repo still alive? Were looking for something to work with PDF's in python but are worried about long term support with this repo (new python versions specifically). Reasons being:
Weasyprint develops its own rendering engine while Playwright uses headless Chromium. So with Playwright you have more "reliable" (in terms of HTML standard compliance) output. But Weasyprint is more lightweight and works well enough for simple layouts.
Weasyprint develops its own rendering engine while Playwright uses headless Chromium. So with Playwright you have more "reliable" (in terms of HTML standard compliance) output. But Weasyprint is more lightweight and works well enough for simple layouts.
But weasyprint is quite slow if the no. of pages in the document increases to around 80-100. Is there any other alternative to it? pdfkit was quite faster in this case.
But weasyprint is quite slow if the no. of pages in the document increases to around 80-100. Is there any other alternative to it? pdfkit was quite faster in this case.
Probably because it is a pure-Python lib, while pdfkit is a wrapper around wkhtmltopdf. Maybe Playwright will have better performances.
hello, coming from xhtml2pdf, it has 1 maintainer, it's really limited in what it can or can't do, it doesn't work with CSS3, so that means you can't use things like bootstrap :(
I have access to merge PRs, but since the wkhtmltopdf project announced it's unmaintained let's just use one of the newer alternatives available. I've personally moved to having Python execute a nodejs script running https://github.com/puppeteer/puppeteer to generate pdfs needing JavaScript execution support. For pages without JavaScript there's also https://github.com/Kozea/WeasyPrint.
Activity
nikaro commentedon Feb 7, 2023
wkhtmltopdf itself is not maintained: wkhtmltopdf/wkhtmltopdf#5160
alessandro-massarenti commentedon Mar 18, 2023
Saw that, is there another recommended library for html to pdf conversion?
nikaro commentedon Mar 19, 2023
@alessandro-massarenti i've personally tried Weasyprint and Playwright.
Weasyprint develops its own rendering engine while Playwright uses headless Chromium. So with Playwright you have more "reliable" (in terms of HTML standard compliance) output. But Weasyprint is more lightweight and works well enough for simple layouts.
RyuFeng commentedon Apr 14, 2023
But weasyprint is quite slow if the no. of pages in the document increases to around 80-100. Is there any other alternative to it? pdfkit was quite faster in this case.
nikaro commentedon Apr 14, 2023
Probably because it is a pure-Python lib, while pdfkit is a wrapper around wkhtmltopdf. Maybe Playwright will have better performances.
I also stumbled across https://github.com/xhtml2pdf/xhtml2pdf recently, but i did not test it. If you do, feedback would be welcome.
gaboAcosta commentedon Apr 4, 2024
hello, coming from xhtml2pdf, it has 1 maintainer, it's really limited in what it can or can't do, it doesn't work with CSS3, so that means you can't use things like bootstrap :(
alanhamlett commentedon May 13, 2024
I have access to merge PRs, but since the wkhtmltopdf project announced it's unmaintained let's just use one of the newer alternatives available. I've personally moved to having Python execute a nodejs script running https://github.com/puppeteer/puppeteer to generate pdfs needing JavaScript execution support. For pages without JavaScript there's also https://github.com/Kozea/WeasyPrint.