Recommended Free Tools
Liquid prepares the content of a PDF; it does not create or paginate the PDF itself. A typical workflow renders Liquid data and logic into HTML, then passes that HTML to a PDF renderer. The Liquid tags and filters you can use depend on the implementation behind your PDF service, so verify its dialect before building a template around a particular feature.
What Liquid does in a PDF workflow
Liquid is a template language created by Shopify and written in Ruby. It binds a data model to a template: it can print values, make conditional choices, iterate over arrays, and compose reusable fragments. It does not decide page size, place running headers, break a long table across pages, or turn HTML into a PDF file.
The usual pipeline has three stages:
- Prepare data. Your application or PDF service provides an object such as
invoice, containing fields and arrays. - Render Liquid. The engine evaluates tags, objects, and filters against that data and produces HTML.
- Render PDF. A separate PDF engine interprets the HTML, CSS, fonts, images, and print rules to produce the document.
Vortex PDF describes its process in those terms: the API injects context data, processes the template, and renders the resulting HTML into a PDF. Python Liquid likewise describes rendering a template against a data model. The key practical consequence is that a successful Liquid render proves only that the template stage worked; it does not prove that the final PDF will paginate or look right.
The three Liquid building blocks
Objects print values
Use double curly braces to output an object or variable. For example, {{ invoice.number }} prints the invoice number. Dot notation accesses properties of an object; inside a loop, it accesses a property of the current item.
#1 Best Overall
Tags control logic and composition
Tags use {% ... %}. Control-flow tags such as if, unless, else, and endif conditionally include content. The for tag iterates over an array. Tags can also assign values and, where supported, render reusable snippets.
Filters transform output
A pipe applies a filter to a value: {{ total | round: 2 }}. Filters can be chained from left to right. Date formatting, rounding, case conversion, escaping, and line-break conversion are common examples, but the exact filters and their arguments are implementation-specific.
A complete invoice template example
This template demonstrates value output, a paid/due condition, an empty-lines check, a line-item loop, and a total. It is intentionally plain HTML: add the print styling appropriate to your renderer rather than relying on Liquid to manage layout.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Invoice {{ invoice.number | escape }}</title>
<style>
@page { size: A4; margin: 18mm; }
body { font: 12pt sans-serif; color: #222; }
h1 { margin: 0 0 1em; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid #ccc; padding: 7px; text-align: left; }
.amount { text-align: right; }
thead { display: table-header-group; }
tr { break-inside: avoid; }
</style>
</head>
<body>
<h1>Invoice {{ invoice.number | escape }}</h1>
<p>Bill to: {{ invoice.customer_name | escape }}</p>
<p>Date: {{ invoice.date | escape }}</p>
{% if invoice.paid %}
<p>Paid</p>
{% else %}
<p>Due</p>
{% endif %}
{% if invoice.lines.size > 0 %}
<table>
<thead>
<tr><th>Description</th><th class="amount">Amount</th></tr>
</thead>
<tbody>
{% for line in invoice.lines %}
<tr>
<td>{{ line.description | escape }}</td>
<td class="amount">{{ line.amount | round: 2 }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>No line items.</p>
{% endif %}
<p class="amount">Total: {{ invoice.total | round: 2 }}</p>
</body>
</html>
The template expects a context shaped roughly like this. Your service may use a different mechanism to submit context data, but the names and nesting must match the template.
{
"invoice": {
"number": "INV-1042",
"customer_name": "Northwind Studio",
"date": "2026-09-29",
"paid": false,
"lines": [
{ "description": "Design work", "amount": 480.00 },
{ "description": "Hosting", "amount": 24.00 }
],
"total": 504.00
}
}
The escape filter is used for values inserted into HTML text and the document title so text supplied as data is not interpreted as markup. Escape untrusted text by default. If a field is intentionally trusted HTML, define that policy explicitly and use only the renderer’s documented mechanism for allowing it; do not remove escaping indiscriminately. Also calculate authoritative financial totals in application logic rather than relying on display formatting in the template.
Rank #2
- Scattered Books Stencil: You will receive a delicate painting stencil with beautiful patterns and a plastic paint brush. There are 6 scattered books patterns on the stencil. This daily theme template is suitable for you to make decorations at home.
- Size Reference: The scattered books stencil is about 8.3x11.7inch/21x29.7cm and it will help you create beautiful works by yourself. The paint brush in the package is about 6.3x0.27x0.2inch/160x7x5mm which you can use it to draw.
- Plastic PET Material: Our stencil is made of plastic PET material which is lightweight, durable, reusable, not easy to break and easy to wash. This stencil has delicate craftsmanship and smooth surface so you can use it for a long time.
- How to Use: Firstly, put the stencil on the place where you need to paint. Then you can use the tape to fix the surrounding a little bit, don't need to stick too firmly for easy to reuse. Then use paintbrush, spray paint, crayon, watercolor pen, marker or other drawing pen to draw the pattern you need.
- Wide Applications: The reusable template is suitable for DIY crafts projects including painting, home decoration and handmade crafts. Our plastic PET stencil can be applied to most flat surfaces like wood, canvas, fabric, rocks, cards, furniture, floor, wall and so on.
Conditions, loops, missing values, and totals
Test optional fields deliberately
Liquid supports strings, numbers, booleans, nil, arrays, and other documented object types. Nil is false in a condition, so an absent field can silently take the false branch instead of producing an obvious failure. Decide what should happen when an invoice number, customer name, date, or total is missing. Supply explicit defaults for optional presentation fields, and configure strict or warning behavior for required fields when the engine supports it.
Handle empty collections
Check whether an array has entries before drawing a table that implies there are line items. The example uses invoice.lines.size > 0; confirm that your dialect supports that size expression. If it does not, use the empty-array check documented for that engine. Test both populated and empty arrays, because an empty loop alone may leave a misleading table header or a blank section in the PDF.
Format for display without changing meaning
Filters are presentation tools. Rounding a displayed amount does not establish how tax, currency conversion, or the invoice total was calculated. Keep business calculations in the application or data-preparation layer, then pass the values the document should show. Confirm the renderer’s date, number, and currency filters, including locale and rounding behavior, rather than assuming one Liquid dialect’s filter set applies everywhere.
Reuse headers, footers, and repeated sections
Liquid’s render tag can include named snippets and pass values explicitly. Shopify documents forms using named parameters, with, and for. For example, a service that supports Shopify-style syntax may allow:
{% render "header", invoice: invoice %}
A rendered snippet has isolated variable scope unless values are passed to it. Pass the data it needs instead of assuming it can see every parent variable. Shopify marks include deprecated in favor of render, but that does not mean every third-party PDF engine supports Shopify’s render syntax. Check the target engine’s snippet naming, parameter syntax, scope rules, and storage requirements before splitting a template into partials.
Rank #3
Liquid composition and PDF running furniture are separate concerns. A snippet can produce header markup, but whether that markup repeats at the top of every printed page depends on the PDF renderer and its supported CSS or header/footer settings.
Check the Liquid dialect before you depend on a feature
“Liquid” does not guarantee identical behavior across products. Shopify documents variations including Shopify’s own dialect and Jekyll extensions. PDFMonkey states that it uses Liquid v4 and that features marked 5.0.0 or later in the official documentation are unavailable in its templates. Treat each PDF service as its own implementation.
Before migrating or choosing syntax, verify:
- The Liquid version or dialect and whether it adds custom tags or filters.
- Supported object access, comparisons, iteration helpers, and whitespace controls.
- Whether
renderorincludeworks, how parameters are passed, and whether snippets have isolated scope. - How undefined variables and unknown filters are handled: ignored, warned about, or treated as errors.
- How strings are escaped and whether the service permits raw or trusted HTML.
Keep a small compatibility template with the constructs your documents use and run it against the actual production service whenever you change providers or versions. A template that renders in Shopify or a local Liquid library may still fail in a managed PDF service with a different dialect.
PDF layout, pagination, and merged documents
Once Liquid has produced HTML, the PDF engine controls the document’s physical behavior: page size, margins, page breaks, font embedding, image loading, CSS support, metadata, and table layout. The CSS in the example is a starting point, not a portability guarantee. Test the actual renderer with the fonts, images, page lengths, and content variations that production documents will contain.
Long tables deserve special attention: check whether column headings repeat, rows split across pages, and totals remain with the intended section. Test both a one-page document and a document long enough to paginate. A browser preview can help inspect the generated HTML, but it is not a substitute for opening the final PDF.
Rank #4
Also verify how the service handles attached or merged PDFs. Current RMS documents a specific limitation: PDFs merged during generation may not include the document layout’s header or footer. Do not assume that HTML headers, footers, page numbering, or branding will be applied to an imported PDF; inspect a merged output from the target system.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsBuild a reliable render-and-check workflow
- Define a stable schema. Document required and optional fields, types, date representation, and array behavior for each document.
- Prepare values before rendering. Validate required data and calculate totals in application logic. Decide which text is untrusted and escape it.
- Keep responsibilities separate. Use Liquid for binding, conditions, loops, and composition; use semantic HTML and conservative print CSS for structure and layout.
- Render with diagnostics enabled. Use strict or warning handling for undefined variables and filters if available. Treat missing required data as a failed document job, not a silently incomplete invoice.
- Generate through the production PDF engine. Use the same renderer and configuration as the real workflow, not only a local HTML preview.
- Inspect representative PDFs. Check empty and populated lists, long content, multiple pages, fonts, images, headers, footers, and merged attachments.
- Record versions and inputs. Keep the template revision, renderer or service version, and relevant data with your job records so you can reproduce an output when investigating a discrepancy.
Troubleshoot common failures
A value prints blank
Check the submitted context for the exact object and property names used by the template, including nesting and spelling. The value may be absent or nil, or the service may expose its context under a different root object. Use strict undefined-variable handling if offered, and test a minimal template that prints only the disputed field.
A tag or filter works locally but fails in the PDF service
The local library and hosted renderer may use different Liquid versions or custom extensions. Confirm the service’s supported dialect and filter list, then replace unsupported syntax with documented features. Do not infer compatibility from the word “Liquid” alone.
The HTML preview looks right but the PDF is broken
The HTML renderer and PDF engine do not necessarily share layout behavior. Inspect the generated PDF for page breaks, missing fonts or images, clipped content, table splitting, and unsupported CSS. Simplify print styles and test with the actual renderer; changing Liquid logic will not fix a PDF engine’s pagination behavior unless the generated markup is the cause.
A header or footer disappears on some pages
Determine whether it is ordinary HTML content or a renderer-managed running header/footer. Check the engine’s documented mechanism and page rules. If the document includes merged PDFs, inspect those pages separately because their layout may not inherit the generated document’s header or footer.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteBest Value
- Floor Stencils for Painting Floors: Our stencils offer a versatile solution for painting floors, delivering a distinct pattern. Also perfect as graffiti stencils, these templates can bring life to any surface.
- Painting and Drawing Stencils: Our stencils are suitable for painting stencils, paint stencils for walls, and drawing. They are ideal for creating art on wood, canvas, paper, fabric, walls, and furniture.
- Educational and Fun Stencils: Our stencils for drawing and painting on canvas are great for a back to school theme. They function as book stencil, family stencils, and classroom decoration stencils.
- Teaching Aid : These stencils also serve as effective teaching aids stencils. Can use these stencils to enhance their creativity and artistic skills.
- Durable Milk White Plastic Stencils: Our stencils are made from sturdy, milk white plastic ensuring their longevity. They are flexible, reusable, and perfect for any painting or drawing activities.
An empty or partial invoice is produced instead of an error
Liquid can treat nil as false, and some implementations tolerate undefined values. Validate required fields before rendering and enable strict or warning error modes where supported. Add explicit empty-array and missing-field cases so the intended result is visible rather than accidental.
Or skip the browser setup
If you have already rendered your Liquid template to a public HTML page, ScreenshotNeo can capture that page for visual review; it does not execute Liquid or replace the PDF renderer. For example, this one-call request saves a WebP screenshot of the rendered page:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for request options. Before capture, it accepts consent banners and removes 60+ known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks, blank pages, and failed loads are never billed, and response headers report the page verdict and billing status. Its MCP server lets AI agents use tools including take_screenshot, get_page_info, and capture_pdf. The Free plan includes 1,000 screenshots a month with no card, and paid plans start at $5 for 3,000.
Sign up free for 1,000 screenshots a month, with no card required.
Which option fits your implementation?
A self-hosted Liquid library gives your application direct control over template rendering and data handling, but you must connect its HTML output to a PDF engine and operate that pipeline. A managed PDF service can provide the context injection and HTML-to-PDF path, but ties you to its Liquid dialect, renderer behavior, and operational model. Compare the following before committing:
Quick Recap
| Decision point | Self-hosted Liquid library | Managed PDF service |
|---|---|---|
| Dialect | Choose and maintain the library and version you deploy. | Confirm the provider’s documented version, extensions, and limits. |
| PDF rendering | You must select and operate a separate PDF renderer. | Check which engine or rendering behavior the service exposes; do not assume browser-level CSS support. |
| Data and errors | You control validation and how undefined values are treated. | Verify context shape, strictness options, logging, and failure responses. |
| Composition | Check the library’s snippet syntax and scope semantics. | Check whether and how the service supports reusable snippets and parameter passing. |
| Operations | Plan for rendering capacity, retries, storage, auditability, and reproducible versions. | Evaluate API latency, retention, retries, audit needs, and the cost of switching providers. |
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

