Skip to main content

One post tagged with "recipe card"

View All Tags

Generate PDF from HTML Using WeasyPrint and PyPDF2

· 17 min read
Michał Szymanowski
Michał Szymanowski
PDFBolt Co-Founder

Illustration of generating PDF files using WeasyPrint, PyPDF2 and Jinja2

In this detailed guide, we'll show you how to create PDF from HTML using a powerful combination of three Python libraries: WeasyPrint, Jinja2, and PyPDF2. Whether you need to generate reports, invoices, certificates, or personalized documents, this approach allows you to leverage your web design skills to produce professional-quality PDF. We'll build a practical recipe card generator that demonstrates how to transform structured data into eye-catching, printable documents.