XML Formatting in Advanced PDF/HTML Templates
When working in advanced PDF/HTML templates, such as email, fax, and marketing, it is important that you use valid XML formatting. Invalid formatting can result in broken pages. Code can seem to work when it is opened in a single page, but the same code can cause broken pages when included in other pages, like Activity View.
Some examples of invalid XML include:
-
Incorrectly nested tags.
-
Missing tags or missing end tags, such as
<table>
and</table>
.
Format tables using CSS. The <table>
method of formatting tables is obsolete and prone to user error.
You shouldn't use CSS formatting outside of the <head>
and <body>
sections. Any content between </head>
and <body>
or after </body>
is suspicious and can be problematic because malicious JavaScripts are often placed there.
To reduce the risk of invalid XML formatting, copy the XML code from your editor and paste it in the source code view of the template editor. When you switch the template to WYSIWYG mode or save, NetSuite validates the template code. If the code contains errors, you will see an error message.
For more information about valid formatting, refer to https://www.w3.org/.
Related Topics
- Source Code Editing in the Template Editor
- Source Code Editing to Customize Advanced Templates
- Syntax for Advanced Template Fields
- Setting a Template to Use a Font Unavailable in NetSuite
- Languages for Printed Forms that Use Advanced Templates
- Adding Translated Content in Advanced Printouts
- Adding Striping to Line Items in Advanced Templates
- Adding Page Breaks to Tables
- Printing Subsidiary Logo on Advanced Templates
- Adding Apply Sublist to Check Templates
- Using FreeMarker to Work with Hidden Fields Used in Advanced Templates
- Adding Bar Codes in Advanced Templates