Skip to main content

4 posts tagged with "jinja2"

View All Tags

Top HTML Template Engines for Dynamic PDF Generation

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

HTML to PDF - Template Engines

Building dynamic, data-driven websites means generating HTML from live data. Template engines handle this by combining HTML layouts with variables, loops, and conditionals. This article covers what template engines are, how they work, their benefits, and the most popular options for Node.js, Python, Java, PHP, and Ruby.

Python HTML to PDF with xhtml2pdf: Step-by-Step Guide

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

Python HTML to PDF generation using xhtml2pdf and Jinja2

This guide walks through building a Python HTML to PDF report using xhtml2pdf, Jinja2 templates, and matplotlib charts. By the end, you will have a working script that reads sales data from a JSON file, renders it into styled HTML, and converts it to a PDF ready for distribution or printing.

PDFKit Python: Convert HTML to PDF with wkhtmltopdf

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

Python HTML to PDF conversion using PDFKit and wkhtmltopdf - contract generator example

PDFKit Python is a wrapper for wkhtmltopdf that converts HTML to PDF using the WebKit rendering engine. This guide covers Python HTML to PDF conversion with PDFKit, building a contract generator that produces multi-page documents with headers, footers, and custom styling. The tutorial uses Jinja2 for templating and walks through the full Python PDF generation workflow step by step.

Python HTML to PDF with WeasyPrint and PyPDF2: Full Guide

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

Python HTML to PDF generation using WeasyPrint, PyPDF2, and Jinja2

This guide walks through Python HTML to PDF conversion using three libraries: WeasyPrint, Jinja2, and PyPDF2. Whether you need to generate reports, invoices, or certificates, this approach turns your existing HTML and CSS skills into a Python PDF generation workflow. The tutorial builds a recipe card generator that converts structured JSON data into printable documents.