Source Code Editing in the Template Editor

You can use the Source Code toggle to manually edit markup source for a template. You can make template edits directly in this markup source if you have sufficient knowledge of HTML.

Warning:

Don't modify markup source directly unless you know CSS and HTML. NetSuite doesn't offer support or training in CSS or HTML.

Be aware that the template editor may not function properly if you switch back to WYSIWYG mode after you've made edits in markup source mode. Some template content may not display correctly, may not be accessible for editing, or may not display at all.

If these issues occur, you can preserve template content by not saving the template in WYSIWYG mode and switching back to markup source mode.

Important:

To avoid issues when copying and pasting the code, use a plain text editor to check for any hidden characters.

Advanced PDF/HTML Templates source code view sample.

The template editor supports syntax highlighting of markup source, for improved readability.

You can edit the HTML markup source to customize your advanced PDF/HTML template as follows:

Use FreeMarker directives to customize date formatting in the template. For example, using a date format containing MONTH doesn't return the name of the month in uppercase. To display the month in uppercase, use the FreeMarker uppercase directive, for example: {$record.duedate?upper_case}.

In advanced template, some of the markup source syntax relies on BFO (Big Faceless Organization), a set of third party libraries used by NetSuite for generating PDF documents. BFO documentation is available at http://bfo.com/products/report/docs/userguide.pdf

Note:

If you're having issues with your advanced template, don't contact BFO directly. Always contact NetSuite Customer Support.

Empty BFO elements that are closed are subject to HTML formatting, for example, </totalpages> processes as <totalpages> </totalpages>.

Some HTML elements can be displayed as literals in printed text. For example, if a field contains the character for a line break, then the line break literal value of “<br />” is displayed.

Important:

The following aren't supported in advanced templates because of BFO processing.

Don't use the cellspacing attribute. Instead, use the cellmargin attribute.

Don't specify a body width in percentage or you'll receive a no size specified error. Use an absolute value, for example, <body width="595">.

Related Topics

General Notices