RestAPI Failing when document size > 100MB

Which product are you using?
PDF.js Express Plus - REST API

PDF.js Express Version

Detailed description of issue
Error “Failed to fetch” received when linking a 100mb+ file.

Does your issue happen with every document, or just one?
Issue occurs when the document size > 100mb

Code snippet

let xfdfString = '' //Actual XFDF XML
const utils = new ExpressUtils({
  serverKey: 'key',
  clientKey: 'key'
(async function () {
  try {
    const response = await utils.merge();  
    const mergedFile = await response.getBlob();
    let file = new File([mergedFile], fileName, {lastModified: new Date().getTime(), type: mergedFile.type})
    let url = window.URL.createObjectURL(file);
    let tempLink = document.createElement('a');
    tempLink.href = url;
    tempLink.setAttribute('download', fileName);;
  } catch (e) {
    return alert(e.message)

Hi there,

What is the error message you are getting from the response? Are you getting any errors in the console?
Can you share the URL for us to take a look?

Best regards,
Kevin Kim

Link to document: LINK

Error in console: POST net::ERR_FAILED 502 (Bad Gateway)

The above error is only when the file size is higher.

Hi there,

This may be due to the complexity of the document itself, when loading this document on pdf.js express, and scrolling to the bottom of the document, this puts a heavy workload on the viewer and results in an error message regarding memory:

Best regards,
Kevin Kim

So how can this issue be resolved?

We can definitely add this to the backlog to investigate, but we also recommend potentially switching to our new WebViewer-ecommerce platform: WebViewer: JavaScript Document SDK | Apryse

Best regards,
Kevin Kim