FAQs for Advanced Printing

When I print or preview my PDF, how is it created?

NetSuite does the following when you preview or print an advanced PDF template, and when you move from WYSIWYG to Source Code mode:

  1. Parse FreeMarker.

  2. BFO libraries validate XML.

  3. Generate PDF based on the BFO XML.

Why do the templates use tables for formatting instead of divs?

For best performance, you shouldn't use nested tables.

Can I preview the HTML output for a template like I can for a PDF template?

No, you can't preview HTML templates. You should use PDF output unless there is a specific use case for HTML.

In WYSIWYG mode, can I create multiple headers?

No, you can’t create multiple headers in WYSIWYG mode.

How can I refer to fonts and images in the File Cabinet without using the full URL?

You can add data center agnostic URLs to your template. For a list of fields that you can use to dynamically generate a URL link, or part of a URL, see Syntax for Body Fields.

Ensure that any files that you use from the File Cabinet have either the Available Without Login box checked, or Company-Wide Usage box checked. Otherwise, you can't use them during printing.

Note:

If you check the Company-Wide Usage box, you must edit the template source code and use the <@filecabinet> directive.

For more information, see Syntax for Advanced Template Fields and Including Images in Advanced Templates.

Why am I getting an "Invalid PDF layout. Please contact your administrator" when I try to print multiple invoices in PDF format?

The Print Using HTML box is checked in your preferences. To change this, see the following solution:

  1. Go to Home > Set Preferences.

  2. Click the Transaction subtab.

  3. Clear the Print Using HTML box.

  4. Switch the Transaction Email Attachment Format radio button from HTML to PDF.

  5. Click Save.

Note:

This is one of the possible solutions to the error. If the error is still not resolved, contact NetSuite Customer Support.

Why am I getting an "Invalid PDF Layout. Please contact your administrator" error when I try to print a transaction using Advanced PDF Template?

The Print Using HTML box is checked in your preferences. To change this, see the following solution:

  1. Go to Home > Set Preferences.

  2. Click the Transaction subtab.

  3. Clear the Print Using HTML box.

  4. Switch the Transaction Email Attachment Format radio button from HTML to PDF.

  5. Click Save.

How can I fix my advanced printing template when it relies on a hidden field?

A field will be hidden from an advanced printing template if the field's show box is cleared on the custom form. A visible field is represented in the advanced template as a Boolean value. If the field is hidden, you must change the advanced template to compare the value of the field with a string instead.

If you don't know whether the field is visible, it's best to create a condition in which the template works correctly either way.

For example, to create a condition for the Corporate Card field:

            <#if (expense.corporatecreditcard?is_boolean && expense.corporatecreditcard) | | (expense.corporatecreditcard?is_string && expense.corporatecreditcard == "T")> "Corporate Card" is checked!
</#if> 

          

For more information, see Using FreeMarker to Work with Hidden Fields Used in Advanced Templates.

Is there a size limitation for XML file input for PDF creation?

Yes, the size limitation is 100MB. If your file is bigger, printing results in an error. For more information, see Error Messages in Advanced Templates.

Related Topics

General Notices