Skip to main content

3 posts tagged with "thymeleaf"

View All Tags

How to Generate PDF from HTML in Java Using Flying Saucer

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

Convert HTML to PDF in Java using Flying Saucer and Thymeleaf – step-by-step guide

Looking for a reliable way to convert HTML to PDF in Java – without relying on headless browsers or heavyweight libraries? In this tutorial, you'll learn how to use Flying Saucer (xhtmlrenderer) together with Thymeleaf templates to generate clean, print-ready PDFs directly in your Java application. Flying Saucer is a lightweight, pure Java library that renders XHTML and CSS into PDF format – no external rendering engines required. It works well for reports, invoices, and other dynamic documents where fast, consistent PDF generation matters.

HTML to PDF in Java with Playwright and Thymeleaf

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

HTML to PDF with Playwright in Java

Need to convert HTML to PDF in your Java project? This tutorial shows you how to use Playwright for Java together with Thymeleaf templates to generate clean, well-formatted PDFs. We'll build an invoice generator that renders HTML to PDF using a headless Chromium browser, with full CSS and JavaScript support. The code examples are ready to copy and adapt for your own HTML to PDF generation in Java.

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.