2

We have an app which launches Electron browser. In the Electron browser we load a third party website which has a link.

When we view this site in the Chrome or IE browsers, clicking on this link it renders a PDF in an iFrame but for electron browser it shows a save file dialogue. We want to display this PDF in the electron browser just the same way it works for Chrome and IE. As it is a third party website we don't have control over rendering or loading PDF file or we are not getting any events related with loading of this PDF.

For this scenario, if there is no way to display PDF in electron then it is OK to block it so the Save file dialogue will not show.(This app is actually in the KIOSK so we don't want to save a file if it doesn't render in browser.)

Thanks in advance for your comments!

Abhi
  • 53
  • 1
  • 7

1 Answers1

0

Here is a discussion on an issue almost identical to yours. The answer does a decent job explaining why the download option is appearing. As for preventing the pdf from being downloaded, try using the <embed> tag as it detects compatibility. So embed the pdf using that tag and then load the html into the <iframe>. Here is some example code and description of how to set that up.

Rook
  • 141
  • 13
  • the pdf link is in external page which we don't have access to. We launch a HTML page in electron window and then the loaded page has links to the PDFs – Paresh Varde Aug 04 '17 at 07:05