Marty Zigman - The NetSuite Expert

Conversations with Marty Zigman

Certified Administrator • ERP • SuiteCloud

Prolecto Labs Accelerator Templates

Learn how to Overcome NetSuite’s 10 MB PDF File Size Limitation

Infrastructure NetSuite



This article is relevant if you are seeking to get around or overcome NetSuite’s 10MB file limitation to store PDF files.

Background

Ever since we developed a free of license charge tool to extend NetSuite’s ability to combine multiple saved searches and transform result data to drive PDF and other string-based outputs, we have seen all kinds of challenging client situations. For those that do not know, we have a tool, called the Content Renderer Engine (CRE), that all of our clients leverage when NetSuite’s built-in PDF and other report outputs prove insufficient. See this article for more information.

For a client that had a requirement to assemble multiple invoices into a consolidated invoice, we bumped into NetSuite’s 10-megabyte file system limitation. See this article on the NetSuite consolidated invoice technique.  Our client liked the idea that a PDF-based customer invoice represents an immutable document. They didn’t care about the 10 MB limitation — they just wanted a solution to the size limitation.

We discovered that this file limitation situation was challenging. Naturally, we thought we could work with a remote filesystem to overcome the situation. “Let’s not use NetSuite’s filesystem and be done with it” the thought went. However, in the generation of the PDF file with NetSuite’s processes, to move the file to a remote system, we would first need to write to NetSuite’s filesystem as a file object (breaks here) before we would be able to stream the bits to a remote system. Hence, no solution.

In our client’s situation, we didn’t notice the situation until the number of invoices being consolidated became sufficiently large. At about 80 invoices in our consolidated algorithm, the resulting PDF became greater than 10 MB. Note, the technique to pull already existing PDF files into a new PDF is provided via the BFO ‘PDFSET’ syntax. BFO is the software framework that NetSuite integrated into its platform to give us PDF generation capacities. We would loop 80 times with references to already existing PDF invoice files to create a document with 80 PDFSET links to feed BFO to create the desired final consolidated PDF document.  The result though was over 10 megabytes.

How We Solved The NetSuite Filesystem Challenge

After confirming that indeed the 10MB filesystem limitation could not be overcome (we tried writing from all the various API offerings; at one time in NetSuite’s past, there were indeed ways to post files larger than 10MB), we had to come up with a solution. Here is what we did:

  1. Detailed Invoices Are Sound: we respected that each detailed invoice was on stable on disk. By themselves, they posed no issue.
  2. Consolidated Invoice Representation: instead of actually generating the PDF, we would store an HTML/XML version of the consolidation syntax on the filesystem. Our assumption was that this file would not actually get distributed — but it would represent the instruction set needed to produce the PDF when needed.
  3. Email Distribution Enhancement: The client wanted to keep its existing email attached PDF distribution practices because the majority of the time, we had no issues. However, when we knew we would break the 10 MB boundary, we instead crafted an email message offering a link to download the consolidated invoice. In some respects, this is good because to receive an email that is over 10 MB can be troublesome for some mail platforms.
  4. On-Demand Invoice Distribution: It is here that we overcame the 10 MB limitation. The link provided in the email message would route to a custom NetSuite Suitelet that would then generate the PDF in NetSuite’s memory. Instead of writing to the file system, we would supply the PDF binary as the HTTP response object — a natural process for working with the SuiteLet input/output programming model. What this means is that the user’s browser would receive the PDF information and render it on its local system.

In our testing, we were able to create a 500 megabyte PDF and send it to the browser without any issue. The client was satisfied with the solution.

Work with NetSuite Experts

We get to work with so many different clients in our NetSuite Systems Integration Practice. Consequently, we see all kinds of situations which challenge our understanding of NetSuite, our assumptions, and thus our thinking.   Yet, we succeed and become better.  Our philosophy is to balance the effort to produce new NetSuite solutions against the benefits received — the intersection being client value.

If you would like to be notified of new articles, feel free to subscribe. If you have a challenging NetSuite endeavor, let’s have a conversation.

Marty Zigman

Holding all three official certifications, Marty is regarded as the top NetSuite expert and leads a team of senior professionals at Prolecto Resources, Inc. He is a former Deloitte & Touche CPA and has held CTO roles. For over 30 years, Marty has produced leadership in ERP, CRM and eCommerce business systems. Contact Marty to set up a conversation.

More Posts - Website - Twitter - Facebook - LinkedIn - YouTube

About Marty Zigman

Marty Zigman

Holding all three official certifications, Marty is regarded as the top NetSuite expert and leads a team of senior professionals at Prolecto Resources, Inc. He is a former Deloitte & Touche CPA and has held CTO roles. For over 30 years, Marty has produced leadership in ERP, CRM and eCommerce business systems. Contact Marty to set up a conversation.

Biography • Website • X (Twitter) • Facebook • LinkedIn • YouTube

2 thoughts on “Learn how to Overcome NetSuite’s 10 MB PDF File Size Limitation

  1. vajrala madhu somasekhar reddy says:

    is this a bundle to install in our account?

  2. Marty Zigman says:

    Hello Vajrala,

    For this item, we don’t have a ready-to-go bundle. But we have the patterns and can work with you to get this implemented. Please contact us at https://www.prolecto.com/contact-us/
    Marty

Leave a Reply

Your email address will not be published. Required fields are marked *