Print templates are managed from the action bar of each table. Hover over the printer icon from the table view of records, then select New HTML Template or New Word/PDF Template to create a print format which may contain text with specific fields inserted wherever you like.

If you want to create a PDF output, you'll still use a Word file to create the template, although the PDF output generally alters the formatting. When creating a PDF print template, be sure to test the output thoroughly.

This article discusses how to create a print template in any given table. For information about print templates included in the default Contracts table, see the Create Contracts section of the Contracts Table article.


HTML Template WizardWord/PDF Template Wizard

HTML Template Wizard


Format Considerations

Each format has benefits and drawbacks. Here are some common considerations for each format:


WordPDFHTML
Pros
  • Output is fully editable and easy for power users to revise
  • Can include images
  • Can include headers and footers
  • Can include mathematical formulas based on field values in the record
  • Can include bookmarks using the print_template_remove_bookmark custom variable
  • Output is not editable and therefore more secure
  • Can include headers and footers
  • Highly configurable
  • Can include images
  • Can create barcodes
  • Can include mathematical formulas based on field values in the record
ConsEditable output is less secure, but you can use a locked template to automatically track any changes to the final document
  • Non-editable output is difficult to revise
  • Formatting is more difficult, and some formatting is impossible
  • Must use Word tables with invisible borders to align text, rather than using Tab
  • Requires knowledge of HTML to set up the template well
  • Not a standard format for contracts and other common documents

Building a Template

You can include information from the selected record in the print template output. This ranges from ordinary fields to complex embedded related tables and attached files. If you're building a Word or PDF template, you can click Show Field Variables or Download Template to see all the available fields in the appropriate syntax.

For details about syntax, refer to Print Template Syntax Reference. For details about embedding related tables, refer to Embedding Tables and Fields from Tables.

Selectable Templates

If different records will use different print formats, you can create a print template that pulls its formatting from a field instead of hard-coded file. With this setup, you can use a single print template configuration while accommodating different print formats. 

For example, in a typical contract management scenario, the Contract Types table has an attached file field called Print Template File that holds or links to the available print templates. In each contract type, the relevant print template is selected in this field. When users select a contract type for a new contract, you can automatically pull in the selected print format as part of the linked set.

  1. Set up an attached file field in the table, either as a local field or a link to another table that stores all available print templates.
  2. When you create the print template, load the template from a Field instead of a File, and select the attached file field. In this example, the attached file field is named Print Template File.

Locked Word Templates

If a PDF doesn't suit your needs, but you don't want a Word template to be freely edited, you can lock the template so that all changes are tracked. When the document is ready to be finalized, the person with access to the password can review all changes and accept or reject them as needed. This is also useful when you already have a Word template designed, but the template doesn't look right when you apply it to PDF formatting.

To lock your Word template for editing, configure your template as desired and then:

  1. Go to the Review tab and click Restrict Editing.
  2. Configure the options as desired:
  3. Click Yes, Start Enforcing Protection.
  4. Set a password to unlock the restrictions. This is the password you'll need to distribute to people responsible for reviewing the changes and producing a final version of the document. You might also store the password in a field if you use a table to store all the print templates; in the default Print Templates table, you can use the Password for Locked Word Document field.

Bookmarks in Templates

You can add bookmarks to Word templates and configure your system to preserve the bookmarks in the finished output. To do this, go to Setup > System > Manage Global Variables, open the Customized Variables tab, and select New > Choice Constant. Create a new global variable named print_template_remove_bookmark and set it to No.

Bookmarks can only be preserved in Word-format print templates, not PDF or HTML formats.

Managing Print Templates

Print templates are accessed through a table’s action bar. By hovering over the Printer icon, you can bring up the print template options. From here, you have a few different choices:


Related articles