// Read PDF as Buffer Array using Fetch API: fetch("./invoice.pdf") .then( res => res.arrayBuffer() ) .then( arrayBufferData => console.log(arrayBufferData) );