Code Templates
Build and customize PDF templates with HTML, CSS, and Liquid.
The Liquid Syntax
Introduction to Liquid, the templating language used in PDFMonkey code templates. Learn output tags, logic tags, objects, and filters for dynamic PDF content.
Using Dynamic Data
Define JSON test data in your PDFMonkey template to preview output in real time, access nested values with dot notation in Liquid, and create variables using assign and capture tags.
Formatting and Transforming Data
Complete reference for Liquid filters in PDFMonkey: built-in filters for string manipulation, number formatting, array operations, and date formatting, plus PDFMonkey-specific filters for barcodes, Base64 encoding, currency formatting, and more.
How to do Maths
Perform arithmetic in Liquid templates using PDFMonkey's math filters: plus, minus, times, divided_by, modulo, round, ceil, and floor with working examples.
Conditions and Loops
Use Liquid conditionals like if, else, unless, and case alongside for loops and tablerow tags to control what appears in your PDFMonkey template output.
Images and Links
Add images and clickable links to your PDFMonkey PDFs using external URLs, embedded images, inline SVG, or dynamic sources from your document data.
Image Resolution and File Weight
Why image-heavy PDFs are larger than expected and how to size images correctly for optimal file weight and print quality in PDFMonkey templates.
Page Layout
Control page sizing, margins, single-page layouts, full-page backgrounds, and page breaks in PDFMonkey code templates.
Web Fonts
Use Google Fonts, icon fonts like Font Awesome, custom typefaces, and emojis in PDFMonkey templates. Includes header and footer font inlining for reliable rendering.
Custom JavaScript
Add JavaScript to PDFMonkey code templates for dynamic calculations, Chart.js graphs, date formatting with Day.js, and DOM manipulation before rendering.
Custom CSS
Style PDFMonkey code templates with CSS, import external frameworks like Tailwind, and add per-document styles.
Using QR Codes
Generate QR codes in your PDF templates with PDFMonkey. Three JavaScript libraries compared — from fully customizable to quick and simple.
Header and Footer
Three approaches to adding headers and footers to your PDFs — from the built-in settings fields to in-content placement and the full-power Paged.js solution.
Reusable Template Components with Snippets and Partials
Avoid code duplication in PDFMonkey templates with Snippets and Partials. Share code across multiple templates with Snippets, or define reusable blocks within a single template using Partials.
Interactive PDF Forms (AcroForms)
Generate fillable PDF forms with PDFMonkey by adding marker syntax to your templates. Create text fields, checkboxes, dropdowns, radio buttons, date pickers, and more.
CLI
Edit PDFMonkey templates locally with the official CLI tool. Use your preferred code editor, sync changes to the cloud, and streamline your template workflow.
Our Engines
PDFMonkey engine versions v2 through v5: Chrome versions, key capabilities, and what each engine supports for PDF rendering.
Professional PDF Template Creation Service
Let PDFMonkey's team design and code your PDF templates. Starting at 1,000 EUR — includes pixel-perfect HTML/CSS implementation, dynamic data wiring, and iterative review.