Join us at SuiteConnect 2026 in San Francisco on April 28 Book a Meeting

14 minutes Read

Published On

How to Append Two or More PDF Documents in NetSuite (Step-by-Step Guide)

Managing multiple PDF documents in one place is a common requirement in business workflows. Whether it’s combining invoices, packing slips, or reports, having a single consolidated PDF improves efficiency and makes sharing easier.

In Oracle NetSuite, appending or merging PDFs is not available as a direct out-of-the-box feature. However, you can achieve this using SuiteScript and PDF rendering techniques.

This guide walks you through the correct approach to append multiple PDFs in NetSuite.

When Do You Need to Append PDFs in NetSuite?

Combining PDFs is useful in several real-world scenarios:

  • Merging invoice + packing slip before sending to customers
  • Combining multiple reports into one document
  • Creating complete order documentation for internal use
  • Automating document generation for workflows

Key Concept: How PDF Merging Works in NetSuite

NetSuite does not directly “merge” PDFs like external tools. Instead, it uses:

  • SuiteScript 2.x
  • N/render module
  • XML-based PDF templates (BFO format)

You essentially combine content into one PDF template rather than merging existing PDFs natively.

Method 1: Append PDFs Using SuiteScript (Recommended)

This is the most reliable approach using NetSuite’s native capabilities.

Step 1: Create a SuiteScript File

Go to:
Customization → Scripting → Scripts → New

  • Choose SuiteScript 2.x
  • Upload your script file to the File Cabinet

Step 2: Load PDF Files from File Cabinet

Use the N/file module to load existing PDFs:

define([‘N/file’, ‘N/render’], function(file, render) {

 function mergePDFs() {

   var pdf1 = file.load({ id: 123 }); // File ID of first PDF

   var pdf2 = file.load({ id: 456 }); // File ID of second PDF

Step 3: Combine PDFs Using render.xmlToPdf()

NetSuite requires you to wrap PDFs inside an XML structure:

   var xml = ‘<?xml version=”1.0″?>’;

   xml += ‘<!DOCTYPE pdf PUBLIC “-//big.faceless.org//report” “report-1.1.dtd”>’;

   xml += ‘<pdfset>’;

   xml += ‘<pdf src=”‘ + pdf1.url + ‘”/>’;

   xml += ‘<pdf src=”‘ + pdf2.url + ‘”/>’;

   xml += ‘</pdfset>’;

Step 4: Generate the Combined PDF

   var mergedPdf = render.xmlToPdf({

     xmlString: xml

   });

   return mergedPdf;

 }

 return {

   execute: mergePDFs

 };

});

Step 5: Save or Download the Merged PDF

You can now:

  • Save it to the File Cabinet
  • Attach it to a record
  • Send it via email

Example:

mergedPdf.name = ‘MergedDocument.pdf’;

mergedPdf.folder = 123; // Folder ID

mergedPdf.save();

Method 2: Combine PDFs via Advanced PDF Templates

If you’re generating PDFs from transactions, you can combine content at the template level.

Steps:

  1. Go to:
    Customization → Forms → Advanced PDF/HTML Templates
  2. Edit or create a template
  3. Use XML structure to include multiple sections
  4. Combine data sources into one output

⚠️ Note:
This method works best when PDFs are generated from NetSuite data, not existing files.

Common Challenges You Might Face in Appending Multiple PDF Documents (and Fixes)

1. PDFs Not Merging Properly

Cause: Incorrect XML structure

Fix:

  • Ensure <pdfset> and <pdf> tags are properly closed
  • Validate XML format

2. File Not Found Errors

Cause: Wrong file ID or permissions

Fix:

  • Verify File Cabinet ID
  • Ensure script has access to the file

3. Blank or Corrupted PDF

Cause: Invalid file URLs or unsupported format

Fix:

  • Use correct file.url
  • Ensure files are valid PDFs

Best Practices to Append two or More PDF Documents in NetSuite 

  • Always use SuiteScript 2.x
  • Test scripts in a sandbox environment
  • Keep PDF sizes optimized for performance
  • Use clear naming conventions for files
  • Handle errors using try-catch blocks

When Should You Use This Approach?

Use SuiteScript PDF merging if:

  • You need automation
  • You want to combine existing PDF files
  • You are building custom workflows

Avoid it if:

  • You just need a simple manual merge (use external tools)

Conclusion

Appending multiple PDFs in Oracle NetSuite requires a structured approach using SuiteScript and XML rendering. While there is no native one-click merge option, the render.xmlToPdf() method provides a reliable way to combine documents programmatically.

With the right setup, you can automate document workflows, reduce manual effort, and ensure your business documents are always organized and easy to share.

Stuck on a Step?

If you run into issues while following this guide, you’re not alone. NetSuite configurations can sometimes behave differently based on roles, permissions, or account setup. A missing field, incorrect file ID, or script deployment setting can easily cause things to break.

We continuously update our content to make sure it stays accurate and useful. If something in this guide didn’t work as expected, let us know where you got stuck. Your feedback helps us improve the steps and make them easier for others to follow.

If you need immediate help, reach out to our team and we’ll guide you through the issue step by step.

NetSuite Folio3: We are a NetSuite Alliance Partner

Working with Oracle NetSuite becomes much easier when you have the right expertise on your side. As a trusted NetSuite Alliance Partner, our team helps businesses implement, customize, and optimize NetSuite based on their specific workflows.

From simple configurations like sublists and PDF automation to complex ERP implementations, we support projects of all sizes. Whether you need help fixing an issue, building a custom solution, or scaling your system, our experts are here to help.

Get in touch to see how we can help you get more value out of your NetSuite investment.

Table of Contents

Contact Us

By submitting this form, you agree to our privacy policy and terms of service.

Related resources you might be interested in

We'd love to help you with all your NetSuite needs

Folio3 Your Top Choice:

Middle East Partner 2025
education award 2025
Winner Award
Software and IT Services 2024
Financial-Services-2023
SuiteCommerce 2023

Let's discuss your NetSuite needs

Hello, How can we help you?