All articles

Templates

Preview your document

Your document gets drawn in two places, and it helps to know which is which.

Preview PDF and Export PDF run on Weft's render engine: Chromium with Paged.js pagination, on the render service. Preview PDF shows you exactly what an export of the same content and data produces — the same engine, the same fonts, the same page breaks. The one exception is a workspace on a free trial: there, every Preview PDF is stamped "Trial" in place of the template's own watermark, and exports are not stamped.

The editor's Paged view runs the same Paged.js pagination, with the same rules for repeating table headers and page numbers, but inside your own browser. That makes it a close proof you can watch update as you work. It is not the reference: when it matters exactly where something lands, Preview PDF is the answer.

That matters most for the things only pagination decides: where a table breaks, whether its header repeats, whether a section got orphaned at the foot of a page.

Two ways to look at it

Flow is a continuous view with no page boundaries. It is faster and it is the better mode for writing and placing fields — you are not distracted by pagination while the content is still moving. Headers and footers show as dashed bands above and below the content, and page numbers read 1.

Paged shows real pages, with your margins, headers, footers and page numbers. It is the mode for checking layout as you go.

Switch between them from the bar directly above your document. If you always want one of them, set it as your default in Settings → Preferences → Default preview.

Preview the PDF itself

Preview PDF, in the bar directly above your document, renders the document as it stands — unsaved changes included — through the render engine, and shows you the result. Nothing is stored — it is an ephemeral render for looking at, not an archived export.

Use it as the final check before exporting, and as the authoritative check whenever pagination matters: where a table breaks, whether its header repeats on the next page, what lands at the foot of a page.

Preview against real records

By default a document previews against sample data. To see it against something real:

  1. Open the data pill — the button in the bar above your document that names the data you are previewing.
  2. Under Render source, pick your data source in place of Sample data, and fill in any parameters it asks for. To design against one particular record, type its Record ID; leave it blank for a sample of records. A source that filters on :recordId has just the one Record ID box, and needs it filled.
  3. Press Use live data — it reads Use this record once you have typed a Record ID. If no record has that ID, the data pill says No record found with that ID.

The document now renders against real records pulled through your connection — the same query the final render will run. Dates and times print in the data source's time zone, as they will in the PDF (see Format values).

To keep the editor quick, each list of related records — an opportunity's line items, a project's timesheets — shows only its first rows, 25 for most lists. When a list had more, the data pill's label starts Live · first 25, and opening the pill shows Showing the first 25 related records — the PDF includes all of them. Totals and counts on the page then cover only the rows shown; Preview PDF and Export PDF read every record, so check totals there.

Back to sample data returns you. Live data is a viewing state, not a change to the template; switching back and forth costs nothing and alters nothing.

Preview shapes

Sample data can hold more than one shape — a two-line invoice and a fifty-line one, an order with a discount and one without. Switch between them in the Preview shape section of the data pill.

This is the cheapest way to find the bugs that only appear at the edges: the table that looks fine with three rows and breaks badly with sixty, the optional block that leaves a hole when absent.

Reading the flags

Weft raises two kinds of signal, and they mean different things.

Blocking — something will provably render wrong: a document that cannot be built, or a field that can't be found in the data you have loaded. In Flow, the block is underlined on the canvas and a card for it appears in the things to check list at the canvas's bottom left (see Fix flagged issues). Paged shows neither.

Advisory — something is suspicious rather than broken. The main one is a list that resolves to nothing: your table points at the right place, but this record has no line items, so the table prints only its header row (a repeat prints nothing at all). That is sometimes exactly right and sometimes a filter you got wrong, which is why Weft reports it rather than deciding for you.

Both are collected in the check behind the Preview PDF button (see Check before export), so nothing depends on you having noticed the underline, or on being in Flow.

When Paged view and the PDF disagree

Occasionally they will. Paged view lays your pages out in your own browser, and Safari and Firefox use different layout engines from the Chromium that renders the PDF — even Chrome may be a different version. A font from the System group in the font picker also comes from your computer in Paged view and from the render service in the PDF. So a line can wrap a little differently, and a row or a heading can land on the next page in one and not the other. Paged view also draws your pages inside the editor, with its own backdrop and zoom: it is a view of the pages, not the file.

When they differ, Preview PDF is what ships. Fonts bundled with Weft, and brand fonts you upload, travel inside the document, so they are the same in both.

What is worth reporting is a difference between Preview PDF and the exported file — both come from the same engine and should match. Before you report one, check three things:

  • Export PDF renders the last saved version, so save first.
  • On a free trial, the "Trial" stamp on a Preview PDF is expected. Exports don't carry it.
  • Compare like with like. Flow has no real page breaks and shows page numbers as 1 (headers and footers appear as dashed placeholder bands), so judge pagination in Paged or Preview PDF, never in Flow.

What next