python-pdfkit icon indicating copy to clipboard operation
python-pdfkit copied to clipboard

Is this Repo dead?

Open KeeganOP opened this issue 2 years ago • 7 comments

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:

  1. Last commit more than a year ago
  2. @JazzCore inactive for more than a year
  3. Open issues not being addressed / looked into

Seeing as this repo has 1.8k stars and is used by 7.5k other repos (https://github.com/JazzCore/python-pdfkit/network/dependents) I would imagine this repo needs to be brought back to life or marked as deprecated.

KeeganOP avatar Jan 30 '23 08:01 KeeganOP

wkhtmltopdf itself is not maintained: https://github.com/wkhtmltopdf/wkhtmltopdf/issues/5160

nikaro avatar Feb 07 '23 13:02 nikaro

wkhtmltopdf itself is not maintained: wkhtmltopdf/wkhtmltopdf#5160

Saw that, is there another recommended library for html to pdf conversion?

alessandro-massarenti avatar Mar 18 '23 11:03 alessandro-massarenti

Saw that, is there another recommended library for html to pdf conversion?

@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.

nikaro avatar Mar 19 '23 07:03 nikaro

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.

RyuFeng avatar Apr 14 '23 12:04 RyuFeng

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.

I also stumbled across https://github.com/xhtml2pdf/xhtml2pdf recently, but i did not test it. If you do, feedback would be welcome.

nikaro avatar Apr 14 '23 13:04 nikaro

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 :(

gaboAcosta avatar Apr 04 '24 14:04 gaboAcosta

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.

alanhamlett avatar May 13 '24 11:05 alanhamlett