All articles

Rendering & export

Check your document before you export

Some mistakes do not break a render; they print blank. A mistyped field prints nothing, and content too big for its page is left out of the PDF. Weft checks for these before you render and shows you where each one is.

Before you start

  • In the hosted app, previewing, exporting and saving need the editor role or higher. Local mode has no roles, and offers Preview PDF but not Export PDF.
  • The check judges your template against the data you have loaded: the sample you are previewing, or live records. To check the edge cases, switch samples under Preview shape in the data pill (the button above the document that names the data you are previewing, such as Full quote). After you edit the sample JSON yourself, the pill reads Loaded data.

Where the check appears

The PDF button sits at the right of the bar directly above your document.

  • A number on Preview PDF counts the findings: red when at least one is a problem, amber when all are advisories. When the canvas is narrow the button shows only its icon; the number stays.
  • The caret beside it (tooltip Preflight & PDF options) opens the menu. Findings come first, problems in red, then Preview PDF (it reads Preview anyway while there is a problem, as in the picture below) and, in the hosted app, Export PDF (Export anyway) and, once the template is saved, Past exports….
  • In local mode the caret appears only when there is something to report.
The Preview PDF button above the document shows a red badge with the number 2. Its menu is open beneath it, listing This field won't resolve in red, then This list will be empty, then a Preview anyway action.

What it finds

Problems

These would print blank, or stop the PDF rendering at all. They are the same issues that, in the Flow view, Weft underlines on the canvas and lists in the dock at the canvas's bottom left, headed with a count such as "3 things to check" (see Fix flagged issues). There a field or list problem is marked in amber; in this menu every one of them counts as a problem.

FindingWhat it means
This field won't resolveA field's path leads to nothing in the loaded data, often a typo
This list won't resolveA table's or repeat's list path, or the list a total adds up, leads to nothing in the loaded data, often a typo
This isn't a listA table's or repeat's list path, or the list a total adds up, leads to a single value, not a list of rows
This condition won't resolveA field in a condition leads to nothing: a Show only when condition, a styling rule, a Conditional element, a column's condition or the watermark's. The condition reads the field as empty, so content can show or hide for the wrong reason
This formula won't resolveA field part of a formula leads to nothing, so the formula prints nothing
This total won't resolveA total's field leads to nothing for the rows of the list it adds up
This barcode's field won't resolveA barcode's Value path leads to nothing, so the barcode has nothing to encode
This field renders empty hereA field of one row sits in a table's footer, group header or subtotal, which print once for the whole table or group
No preview data yetA saved template opened with no preview data in this browser: its fields show empty and there is nothing to check them against. It is one finding for the whole template; load data from the data pill (see Manage templates)
This block needs a fix or This document needs a fixA setting Weft cannot render as it stands; the message says which. The PDF will not render until it is fixed

Advisories

FindingWhat it means
This list will be emptyA table or repeat whose list has no items in the loaded data. The message says what still prints: a table prints only its header row, plus its footer row if it has one; a repeat prints nothing; an empty sub-row level leaves its row without sub-rows. Often this is fine
This list is empty for some rowsA list inside a repeat or table is empty for some of the outer rows; the message says how many, and what prints for those rows
A page overflowed when you last paginatedWhen the Paged view last built pages, some body content did not fit its page and will be missing from the PDF. For several pages it reads Pages overflowed when you last paginated

Overflow is measured only when the Paged view builds its pages: when you open it, or press ⟳ Refresh there. The result survives switching back to Flow, but an edit or a change of data clears it until you measure again, so its absence after an edit does not mean the content fits.

Go to a finding

Click a finding to select the block it is about. The menu closes and, in the Flow view, the canvas scrolls to that block. Fix it in the properties panel (⌘., or Ctrl+. on Windows) or, for a problem in the Flow view, from its card in the dock at the canvas's bottom left, which may offer a one-click correction. Overflow, No preview data yet and This document needs a fix concern the whole document, so there is no block to select.

Render anyway

  • With only advisories, or no findings, Preview PDF renders straight away.
  • With any problem, pressing Preview PDF opens the menu instead, and its actions read Preview anyway and, in the hosted app, Export anyway. Choose one to render the document as it is. The check never stops you; it makes sure you have seen what it found.

Export PDF saves the template first when it has unsaved changes or has never been saved, so the size check below can appear on the way.

The check before a large save

In the hosted app, one save can carry up to 4 MB. Images are normally moved into storage as you save, so few documents come near that, but when one is close to the limit or over it, Weft asks before saving:

  • This document is close to the save limit: the save should go through, but the next few edits may not.
  • This document is too large to save: the save will be rejected.

The message gives the size and what makes it up: pictures or brand fonts still stored inside the document, with the largest named, or the document's own content. That tells you whether to replace large images or split the document into smaller ones. Save anyway tries the save regardless; Go back returns you to the document unsaved.

The check runs on every hosted save, including the one Publish and Export PDF make first when there are changes to save. It also runs when you save blocks to your component library, where the message begins "This component…"; those blocks keep their images inside them rather than in storage. Once a save goes through at one level, Weft does not ask again in the same session unless the document goes over the limit. Local mode saves in your browser and never runs this check.

Good to know

  • The check follows the loaded data. Content that a condition hides for the record you are previewing, and the set of blocks a Conditional element does not use for it, will not print, so their problems are left out here; the canvas still flags them. A mistyped Show only when condition is reported even though it hides its element, since that is often the reason.
  • With no data loaded, and no data source on a hosted template, fields and lists are not judged. An empty list is reported only when loaded data shows it empty.
  • In the hosted app, with a data source chosen under Render source in the data pill, the PDF is filled from that source's records, but empty lists and No preview data yet are judged against what the canvas is previewing. Press Use live data first to check against real records.

What next