NetSuite Services Blog - Integration, News, Release Notes, & Pro Tips

Level Up Your NetSuite PDF Customization with These Two Moves

Written by Johanna Acosta | Aug 20, 2025 3:00:00 PM

Customizing PDFs in NetSuite sounds easy until you’re zoomed in at 200%, nudging elements into place and crossing your fingers it works this time. This goes beyond code, it’s part puzzle, part endurance test.

In this post, I’ll share two simple but powerful PDF techniques that can save you hours of work and elevate your game:

  1. A clever way to visually align content with physical letterheads/checks, without printing 20 test pages.
  2. A clean approach to printing customized PDFs using native NetSuite tools, without relying on Client Scripts or Suitelets.

These aren’t just time-savers - they’re stress reducers and confidence boosters. Let’s dive in!

Trick #1: Visually Align PDFs with Letterhead or Check (Without Wasting 20 Test Prints)

Trying to line up your PDF content with printed letterheads or check stock can be maddening. You tweak the code, print it out, hold it up to the light… and repeat. But here’s a better approach: use the printed version as a visual guide right inside your Advanced PDF layout. 

Step 1: Snap a Pic of Your Physical Template

Take a clean photo or scan of the letterhead or check. Upload it to the NetSuite File Cabinet.

Tip: Make sure the image is publicly accessible (Available Without Login checkbox is checked).

Step 2: Use It as a Background in Your PDF Template

Temporarily embed the image in your Advanced PDF layout so you can align your HTML directly over it.

Tip: If your image URL contains an ampersand (&), replace it with & to avoid breaking your code.

Code Example (Basic Background Setup)

Add this snippet into your Advanced PDF template:

Assign the class page Background to your body or page:

Tip: Add borders to your td elements <td style="border:1px dotted blue"> to help you line them up properly. 

Step 3: Remove the Background Once Aligned

Once everything lines up with your physical template, simply:

  • Remove the background-image from your code
  • Delete the temporary image from the File Cabinet

Your PDF layout is now aligned without a stack of failed test prints.

Trick #2: Go Native: Use NetSuite’s Built-In Print Capability

Let’s say you want to dynamically customize a PDF when the user clicks the Print button. Many consultants mistakenly over-engineer PDF customizations using Client Scripts and Suitelets. But there’s a cleaner way.

Use a User Event Script with Print Context

Use a User Event Script with the context.type == 'print' condition. This allows you to hook into the native Print button functionality instead of rolling your own.

Pass Data to Your PDF with a Hidden Field

Add a custom hidden field to the form (e.g., custpage_customdata). Populate it with the info you want to pass into the PDF.

Pull that field into the PDF template using record.custpage_

  • Make sure you add a #if clause to round your code
  • If you are using an object, use ?eval to convert the object to json

Now when a user clicks the Print button - your custom data shows up, and the formatting is handled smoothly. 

Why This Works

  • No Suitelet needed
  • No Client Script dependency
  • Works with NetSuite’s native Print button
  • Keeps the user experience clean and familiar

You just hooked into native functionality, passed custom data, and controlled the output - all without reinventing the wheel.

Whether you’re aligning PDFs pixel-perfect or streamlining print workflows, these tricks help you work smarter - not harder.