← Back to resourcesHow-to guides · Step by step guide

How to build a PDF layout in NetSuite

Step by step, from a blank template to a layout assigned to a live transaction form.

  1. Open the template editor. Go to Customization > Forms > Advanced PDF/HTML Templates.
  2. Start from a standard template or a blank one. Click New, then choose whether to base your layout on an existing standard template (Invoice or Sales Order, for example) or start from a blank template if the layout is very different from anything standard.
  3. Use the field browser. The template editor includes a field browser panel that inserts the correct FreeMarker reference for you, faster and less error prone than typing field names from memory.
  4. Style with inline CSS. External stylesheets are not supported by the PDF renderer, so keep styling inline or inside a single <style> block in the template itself.
  5. Preview often. Click Preview regularly while building, not just at the end. PDF rendering can behave differently from what the live HTML editor shows, especially around page breaks and repeating tables.
  6. Assign it to a transaction form. Once the template is working, go to Customization > Forms > Transaction Forms, open the relevant form, and assign your new template under the Printing tab so it becomes the default output for that transaction type.
  7. Test with a real transaction. Print or email an actual transaction using the new template, not just the preview pane. Some issues, especially with repeating line tables, only show up in the generated PDF.

Tip: Keep a saved backup of your working template before making major structural edits. Repeating tables break in ways that are hard to trace back to the tag that caused it.