5 ms·
Workflow I've used previously: 1. Render html (easy with a templating language e.g. Jinja for Python) 2. Turn the html into a pdf (e.g. wkhtmltopdf in Python)
by archydeb 3y ago
Workflow I've used previously:
1. Render html (easy with a templating language e.g. Jinja for Python)
2. Turn the html into a pdf (e.g. wkhtmltopdf in Python)
- michidk 3y agoBut this is a rather bloated and slow approach since it's based on a webbrowser, right? I think it also requires some desktop environment like x11?
- flemhans 3y agoHeadless Chromium is the way. Bloated maybe, but does the job.
- gkhartman 3y agoI inherited a codebase that uses this approach. You can use xvfb to get around the x11 frame buffer requirement. It works, but we are looking to migrate to another solution, since it appears that wkhtmltopdf is no longer maintained.
- carlosjobim 3y agoI tried wkhtmltopdf some months ago and the PDFs it generated where nowhere near the original documents.