Grid to PDF

The ability to download grid data into an Excel document has been a feature of Nitro App Builder for quite some time.  Indeed, when someone wants to massage or analyze numbers in their own world, Excel is an ideal tool to accomplish that.

But what about cases where users just want to print the data, or take the output with them for presentation outside of the system?  To address these types of needs, PDF download was added as an option to NAB grids beginning with the 5.2.20190307.0 release.  Unlike Excel, PDF downloads retain all the formatting that was applied to the grid widget, including cell colors and renderers.  Users can decide which download medium they prefer and proceed accordingly. 

As Valence / NAB tips go, this one is quite simple.  To activate the download-to-PDF option on any app, go into Nitro App Builder, call up the desired grid widget, click on Configure and navigate to the "Download" tab in the lower right of the page. Click on the "PDF" checkbox and you'll see a bunch of configurations for the PDF download...

PDF Configuration

The PDF configurations are as follows:

  • File Name - the name of the PDF file to download to the user's browser.
  • Header - (optional) text that will show at the top of each page
  • Header Font Size - the font size of the header text (default is 12 point)
  • Body Font Size - the font size of the body (default is 9 point)
  • Footer Text - (optional) text that will show at the bottom of each page
  • Orientation - Controls the layout of the PDF.  For most grids, landscape is ideal since it allows for more columns to be visible in the page.

It's common for many locations to place their company name on the footer text on all PDF downloads.  In such cases, for added convenience you can globally default the footer text in Portal Admin > Settings > Nitro App Builder > PDF Footer Text.

Grids that have PDF download functionality enabled will show a PDF icon in the toolbar at the bottom of the page.  Note that this is separate from the download icon for creating an Excel document.  It is possible to have both options enabled on the same grid, thereby giving your users the choice of downloading in whichever format is best suited to their needs.

CategoryTip of the Month