1

Does anyone know of a way to force the transaction footer (ie. totals) to print at the bottom of the page using NetSuite's Advanced PDF templates.

NetSuite uses BFO library out of the box.

Cheers

Steve

Steve Reeder
  • 980
  • 16
  • 42

1 Answers1

4

You can easily add content to the bottom of every page using a BFO "macro"

<pdf>

  <head>
    <macrolist>
      <macro id="footer">
        <p>This will print at the bottom of every page</p>
      </macro>
    </macrolist>
   </head>

   <body footer="footer" footer-height="20mm">
     Document contents here
   </body>

 </pdf>

For more info refer to the BFO User Guide page 16.

However, this won't work if you wanted the footer on only the final page of a possibly multi-page document.

http://bfo.com/support/faq/#17

At the moment we do not have a facility for explicitly assigning a footer or header to the last page in a document when the number of pages is unknown.

michoel
  • 3,725
  • 2
  • 16
  • 19
  • 1
    I think there will be a way to do it if I #assign a variable to track the current page, then add an #if section of the footer... Will be interesting to see if the logic can work with the #totalpages macro. – Steve Reeder Jan 20 '18 at 14:45
  • 1
    @SteveReeder unfortunately, that won't work. NetSuite's Advanced PDF/HTML Template feature uses two different Java libraries; FreeMarker as the templating engine to generate an XML document based on the template and record data, and BFO to convert the XML into PDF. `<#if>` is a FreeMarker directive, while the `` and `` elements are BFO elements and not available in FreeMarker. – michoel Jan 23 '18 at 02:06