|
|
|
|
|
by zarekr
659 days ago
|
|
There is no decent solution in Python and I’ve had the same experience with HTML as you, even using Weasyprint (which is the most popular solution for this). Instead I have been using typst (the rust based CLI). There is a Python library that provides bindings or you can run a subprocess to generate the files. It only takes a day or two to get to grips with the typst model and then you can write functions to produce consistent looking pdf files very quickly and with far less overhead than using headless chrome (ie. Playwright or puppeteer). |
|