Advanced PDF/HTML Templates

The Advanced PDF/HTML Templates feature supports an alternative model for customizing printed and emailed transactions. This model supports more customization capabilities than transaction form layouts, also known as basic layouts. (Basic layouts were previously known as legacy layouts.) Administrators and users with the Advanced PDF/HTML Templates permission can customize printed and emailed transactions. To use advanced templates in your account, see Enabling the Advanced PDF/HTML Templates Feature.

When this feature is enabled, you can associate advanced templates with custom transaction forms, so that these templates are used to format printed and email versions of transactions. See Setting Custom Forms to Use Advanced Templates.

You can use advanced PDF/HTML templates to produce either PDF or HTML output, depending on the settings of your print and email preferences. See Advanced Templates Support for Company Printing Preferences.

Advanced PDF/HTML templates support all transaction and print types supported by basic layouts, including internationalized versions. For a list, see Reviewing Available Advanced Templates.

Standard templates are provided for each supported print type. You can create your own customized templates in a Template Editor that supports current industry standards for HTML-based editing, including rich text editing and HTML markup source editing. You can preview your template as you make changes, and detailed error messages are shown if the template cannot be saved. If required, you can change the script ID of custom templates. See Advanced Templates Customization in the Template Editor, Source Code Editing to Customize Advanced Templates, Previewing Advanced PDF/HTML Templates, Error Messages in Advanced Templates, and Changing the Script ID of a Custom Template.

You also can use SuiteScript to produce HTML and PDF printed forms that take advantage of advanced template customization capabilities. See Using Advanced Template Formatting Programmatically.

Each printed form that uses an advanced template automatically includes a company logo, based on the image file defined as the Company Logo (Forms) field at Setup > Company > Company Information. For instructions for defining this image file, see Configuring Company Information.

You can use SuiteCloud Development Framework (SDF) to manage advanced PDF/HTML templates as part of file-based customization projects. For information about SDF, see SuiteCloud Development Framework. You can use the Copy to Account feature to copy an individual advanced PDF/HTML template to another of your accounts. Each advanced PDF/HTML template page has a clickable Copy to Account option in the upper right corner. For information about Copy to Account, see Copy to Account.


To use advanced templates, ensure that the Advanced PDF/HTML Templates feature is enabled. Even when this feature is enabled, no changes are made to basic layouts that are currently in use. However, new enhancements are added exclusively to advanced printing, and Transaction Form PDF Layouts and Transaction Form HTML Layouts will be removed in a future release. You are encouraged to use advanced templates and associate them with custom forms. For more information, see Comparison of Basic Printing and Advanced PDF/HTML Printing.

Advanced PDF/HTML Templates are supported in SuiteCloud Development Framework (SDF). SDF is a development framework that you can use to create SDF SuiteApps, or to customize NetSuite accounts, using an integrated development environment (IDE) on your local computer. SuiteCloud projects are file-based and use XML definitions of custom NetSuite objects. For more information, see SDF Custom Object and File Development in SuiteCloud Projects

Account-Specific Domains in Advanced Printing Templates

You should use URLs that include account-specific domains in PDF templates. Data center-specific URLs found in printing templates are automatically modified to use the appropriate account-specific domain URL for each PDF printout. However, the configuration remains unchanged. You should update all URLs in stored templates to use account-specific domains. For example, you should change a link in your template link to <accountID>, where <accountID> is a variable representing your account ID.

Using Advanced Template Formatting Programmatically


SuiteScript does not support direct access to the NetSuite UI through the Document Object Model (DOM). You should access the NetSuite UI only by using SuiteScript APIs. For information about using SuiteScript APIs to customize the UI, see SuiteScript 2.x Custom Pages.

SuiteScript supports a template engine object and related methods so you can apply advanced template format capabilities programmatically. For SuiteScript 2.0, see render.TemplateRenderer.

In addition, the SuiteScript functions render.packingSlip(options) render.pickingTicket(options) render.statement(options) render.transaction(options) support the use of advanced templates. If you associate an advanced template with the custom form saved for a transaction and use this API to print the transaction, the advanced template is used to format the printed transaction.

You can use SuiteScript to apply advanced templates to printed records that are not transactions. See Using SuiteScript to Apply Advanced Templates to Non-Transaction Records.

Comparison of Basic Printing and Advanced PDF/HTML Printing

Watch the following video that demonstrates and summarizes the advantages of using advanced PDF/HTML templates instead of basic layouts.

Related Topics

General Notices