Append a PDF to a NetSuite invoice

Wrap an invoice Advanced PDF/HTML template in pdfset, append an approved public PDF, and verify the saved two-page print.

The quick answer

Wrap the invoice template’s complete <pdf>...</pdf> element in <pdfset>...</pdfset>. Add a self-closing <pdf src="..." /> after the invoice PDF, inside that wrapper. Use a file URL the renderer can retrieve and encode each bare ampersand as &amp;, once. Save the template and print the same invoice to check every page and its order.

The names, invoice data and file URL are fictional examples.

Before you start

Begin with a copied custom template in a sandbox or controlled test account, with its original source preserved. The copy and its test form are prepared before this walkthrough. Advanced PDF/HTML Templates must be enabled, and your role needs access to edit the file and template. Saving a shared template can affect every form that uses it.

The supplemental file must already be uploaded and must be a retrievable PDF, without password protection or encryption and within the renderer’s supported size and feature limits. Confirm its content and URL after replacing or revising the file.

This example uses invoice INV48271 for Harbor Grove Retail, totaling $918.75. Its saved Delivery Invoice custom form already uses Delivery Invoice PDF/HTML Template for printing. Before starting, inspect the applicable form under Customization > Forms > Transaction Forms: Printing Type must be Advanced, and Print Template must point to the copied template. Save the form only if a change is needed. Menu availability and template selection can vary by role, features and installed customizations; check the print path you actually use.

The one-page Delivery Handling Notice is approved for public distribution. Available Without Login makes the selected file accessible without an interactive login to anyone who obtains its accessible URL. Use it only for an approved public document. Keep confidential attachments private and choose an appropriate access-controlled document workflow instead.

01. Inspect the original print

Open INV48271, confirm its Delivery Invoice form and $918.75 total, then choose Print. The original output has one invoice page. Return to NetSuite after checking it.

The original INV48271 print shows a $918.75 total. Enlarge for its one-page context.

02. Prepare the approved PDF

Go to Documents > Files > File Cabinet and edit delivery-handling-notice.pdf. Confirm that this is the approved public notice. Select Available Without Login, save, then reopen the file to verify the saved flag.

The saved public-access flag applies to this approved notice.

Copy the final URL from the saved file details. As an access check, test the URL without an authenticated NetSuite session and confirm it returns the intended PDF. Then verify the resulting invoice print. Browser success alone does not establish that the renderer can fetch it. Password-protected files and renderer limits need separate handling.

The copied final URL includes its ID and version query parameters.

03. Wrap the original PDF

Open Customization > Forms > Advanced PDF/HTML Templates and edit Delivery Invoice PDF/HTML Template. Turn on Source Code if the visual editor is shown.

Keep the XML declaration and DOCTYPE once, at the top, outside pdfset. Insert <pdfset> immediately before the original opening <pdf> and </pdfset> after its closing </pdf>. Preserve the existing invoice content, styles and macros inside that original PDF.

The original PDF stays inside the new pdfset wrapper.

04. Add the PDF source and save

Add a self-closing <pdf src="..." /> between the original </pdf> and </pdfset>. It is a sibling of the invoice PDF inside the same wrapper, in the desired output order. Use your copied final URL; the URL below belongs to the fictional example.

The relevant structure is:

<?xml version="1.0"?>
<!DOCTYPE pdf PUBLIC "-//big.faceless.org//report" "report-1.1.dtd">
<pdfset>
  <pdf>
    <!-- Keep your existing invoice head, macros and body here. -->
  </pdf>
  <pdf src="https://files.examplesupply.example/core/media/media.nl?id=6648&amp;version=4" />
</pdfset>

Encode each bare ampersand in the literal URL as &amp;. Preserve an existing &amp;; encoding it again produces &amp;amp; and can change the URL the renderer requests.

The query separator uses one XML entity. Enlarge to inspect the complete sibling element.

Choose Save and Edit. Confirm that the template was successfully saved and resolve validation errors before printing.

05. Verify both pages

Reopen INV48271 from Recent Records and choose Print again. The output now has two pages. Page 1 still shows the same invoice and $918.75 total.

The original invoice remains first, with its total unchanged.

Open page 2. Check the complete Delivery Handling Notice, including both handling sections. This example combines a one-page invoice and a one-page notice. Longer invoices or supplements produce different page counts, so check every page and test representative documents before broader use.

The approved handling notice follows the invoice as page 2.

The result verifies the saved template and this invoice’s print path. Check email delivery separately if the document must also go to a customer by email.

Common questions

Where does the supplemental PDF element go?

Place its self-closing pdf element after the original invoice’s closing pdf tag and before the closing pdfset tag. Both PDFs are siblings within one wrapper, in output order.

Can I use a private File Cabinet URL?

Only if the rendering service has a supported way to retrieve it with the required authorization. A URL dependent on your browser session is insufficient. This example uses an approved public file with Available Without Login selected. Confidential documents need an access-controlled workflow designed for that requirement.

Why does an ampersand break the template?

A bare ampersand in an XML attribute starts an entity reference. Encode that literal character once as &amp;. Preserve valid existing entities so the requested URL is not changed by double encoding.

Why did my invoice print stay the same?

Confirm that the template saved successfully and that the invoice’s saved form uses Advanced printing with the edited Print Template. Then check that you are using that print path. Bulk, email, localization or scripted output can select templates differently.

Will the supplement always be page 2?

It follows all pages produced by the original invoice PDF. It is page 2 in this example because the invoice has one page. A longer invoice pushes the supplement later.

Does this prove the customer received the supplement?

No. This walkthrough verifies a saved invoice print. Check the relevant email workflow and delivery separately, along with any acceptance requirements.

Can this append a different PDF for every invoice?

The fixed source URL shown here appends the same file to transactions using this template. Selecting a different file for each invoice requires appropriate conditional data or a separately designed scripted rendering workflow.