Error when loading base64 document

Which product are you using?

PDF.js Express plus

PDF.js Express Version


Detailed description of issue
I keep getting “TypeError: Cannot read properties of undefined (reading ‘split’)” when I try to load base64 document
Expected behaviour
{Provide a screenshot or description of the expected behaviour}

Does your issue happen with every document, or just one?
{Answer here}

Link to document
{Provide a link to the document in question if possible}

Code snippet
{Provide a relevant code snippet}

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:


Hey there,

In the future please fully fill out the issue template so I do not have to ask the following questions:

Can you please provide me with sample code showing how you are loading the document? Also if you have a document that you can reproduce with, sending that over would be helpful as well.


hey Logan,
here is a code sample of how I am loading the document.

//first convert the base64 string to blob
// is a base64 string 

const doc = fetch(
  .then(res => res.blob())

//then load the document using the blob
instance.UI.loadDocument(doc, { filename: 'myfile.pdf' });

Hi there,

fetch returns a Promise that you are not waiting for - you need to await it or move your loadDocument call into the last then block.