In order to start generating documents with Weasyprint I installed it on my Windows machine following these instructions: https://weasyprint.readthedocs.io/en/stable/install.html#step-5-run-weasyprint On my computer it works but I have a Django project where I want to integrate this library and I use pipenv. How to install the necessary libraries even in the virtual environment? I tried setting the path for the pycairo
Tag: weasyprint
Generate PDF from html template and send via Email in Django
I’m trying to generate a pdf file from an HTML template using Weasyprint python package and I need to send it via email using. Here’s what i have tried: But it returns an error as TypeError: expected bytes-like object, not HttpResponse How can I generate and send a pdf file to an email from HTML template? Update: With this updated