Electron needs to support opening PDFs from a Blob. No current alternative right now. Saving PDFs locally and then opening them is not a feasible "work around".
let fileUrl = URL.createObjectURL(data);
ipcRenderer.send('show-pdf', fileUrl);
ipcMain.on('show-pdf', (event, arg) => {
let win = new BrowserWindow({
webPreferences: {
plugins: true
}
});
win.loadURL(arg);
Saving the blob (or converting it from Base64 to bytes) would work for me, but I can't find where (or if) pdf-viewer fits into the Electron distribution once it's built.
Cross reference to this post: Issue
Electron needs to support opening PDFs from a Blob. No current alternative right now. Saving PDFs locally and then opening them is not a feasible "work around".