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:

Do not modify markup source directly unless you have sufficient CSS and HTML knowledge. NetSuite does not provide 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 have made edits in markup source mode. Some template content may not be represented correctly, may not be accessible for editing, or may not be displayed 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 does not 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 are having issues with your advanced template, do not 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 are not supported in advanced templates because of BFO processing.

Do not use the cellspacing attribute. Instead, use the cellmargin attribute.

Do not specify a body width in percentage or you will receive a no size specified error. An absolute value must be set, for example, <body width="595">.

Related Topics

General Notices