One template, many documents¶
Fullbleed offers ordinary batch rendering and compiled document APIs. Choose based on how the content changes.
| Record changes | Start with |
|---|---|
| Each document has unrelated HTML/CSS | PdfEngine batch APIs |
| Text changes inside stable geometry | CompiledDocument.render_pdf_bindings |
| Text or table length changes pagination | CompiledDocument.render_pdf_reflow_bindings |
Fixed fields¶
from importlib.resources import files
import fullbleed
font = files("fullbleed_assets").joinpath("fonts/Inter-Variable.ttf")
engine = fullbleed.PdfEngine(font_files=[str(font)])
template = engine.compile_pdf(
"<h1>Statement {{statement_id}}</h1><p>{{customer}}</p>",
"body { font-family: Inter; }",
)
template.render_pdf_bindings_to_file(
{"statement_id": ["ST-001", "ST-002"], "customer": ["Ada", "Grace"]},
"statements.pdf",
)
Use equal-length, nonempty columns. Keep replacement values within the geometry your template reserves. The 100-record example comes from the checked workflow suite.
Content that changes length¶
The reflow lane retains the template tree and compiles encountered flow variants. It can paginate records of different lengths. The 20-record example produces 41 pages from the current sample data.
Read the CompiledDocument reference for the binding contract, trusted structural slots, compression modes, and examples. The larger compiled reflow project includes table rows, running strings, and per-record page distributions.
Check each record before delivery¶
From Fullbleed 2.5.46, the optional compiled-batch report returns each record's page range and missing characters in its selected registered fonts. Use the batch PDF guide to render variable-length notices and apply your own acceptance policy before saving or delivering the result.
Measure your own workload¶
The performance report retains timings and correctness checks for specified historical fixtures. Compile time, first-seen structures, font shaping, compression, I/O, and record length affect your results. Compare complete, equivalent jobs with output verification enabled.
Print production¶
For PDF/VT job, record, document, and page hierarchies, use the print-output contract. The variable-data examples above are ordinary PDF examples and do not claim PDF/VT conformance.