cardinal

Print formats

Print a Record or save it as a PDF, with your own layout and letter head.

Open a Record and choose Print from the form menu. The print view at /desk/print/<rectype>/<name> has selectors for Print Format, Letter Head and Language. PDF downloads the page as <name>.pdf.

Printing needs the print right on the Record. Drafts print unless Print Settings turns off Allow Print for Draft.

Without a Print Format, Cardinal prints the form's fields in its layout. A Print Format changes that.

FieldUse
Print Format ForRecType or Report
RecTypeThe RecType it prints, such as Sales Invoice
Custom FormatTick to write your own HTML
HTMLA Jinja template
CSSAdded to the page's style
MarginsTop, Bottom, Left and Right in mm, 15 by default
Default Print LanguageThe language it prints in unless the user picks another

Without Custom Format, you get options for the standard layout: Align Labels to the Right, Show Section Headings and Show Line Breaks after Sections.

HTML
<h2>{{ doc.name }}</h2>
<p>Customer: {{ doc.customer_name }}</p>
<table>
  {% for row in doc.items %}
  <tr><td>{{ row.item_name }}</td><td>{{ row.qty }}</td><td>{{ row.amount }}</td></tr>
  {% endfor %}
</table>
<p>Total: {{ doc.grand_total }}</p>

The template gets doc, letter_head, print_settings and no_letterhead. A report's format gets data, columns, filters, rows and total. Each render runs in a separate sandbox process capped at 64 MB and 2 s of CPU.

Letter heads

A Letter Head adds a header and footer to every page.

FieldOptions
Header Based OnImage or HTML
Footer Based OnImage or HTML
Header Height (mm)30 by default
Footer Height (mm)15 by default
Default Letter HeadUsed for every print unless the user picks another

With Print Settings' Repeat Header and Footer on, each PDF page repeats them and the footer shows page numbers.

PDFs

PDFs render through a Gotenberg service with JavaScript off and no network access. Images from /api/file/... that the user may download are embedded in the page. Each PDF download writes an Access Log row.

/desk/print-settings holds the site-wide options.

FieldDefaultEffect
PDF Page SizeA4A0 to Tabloid, or Custom with PDF Page Width and Height in mm
Repeat Header and FooteronLetter head and page numbers on every PDF page
Print with Letter HeadonUse the default Letter Head
Allow Print for DraftonDrafts can print
Always Add "Draft" Heading for Printing Draft RecordsonA DRAFT banner on draft prints
Allow Print for CancelledoffCancelled Records can print, with a CANCELLED banner
Max Bulk Print Records100Most Records one combined PDF may hold

A Print Heading replaces the RecType name at the top of a print. Create one such as Tax Invoice, then pick it in the Print Heading field that ERP vouchers such as Delivery Note have.

On this page