Bug description
When adding an iframe with src to an pdf file, chromium will display its pdf viewer inside the iframe.
Example:
<iframe src="https://example.org/test.pdf"></iframe>
will show the pdf viewer inside the iframe.
nativefier does not show the pdf viewer at all but starts downloading the file silently in the background.
nativefier --help and https://github.com/jiahaog/nativefier/blob/master/docs/api.mdSteps to reproduce
nativefier "data:text/html;charset=utf-8,<html><body><iframe src="https://www.jena.de/fm/41/test.pdf"></iframe></body></html>"Expected behavior
chromium pdf viewer should show the pdf file
Actual behavior
example pdf is downloaded in background
Debug info
Verbose logs (command-line and/or in app DevTools console), error message, screenshots
Context
i also tried enabling electron plugins in browserwindow options (https://stackoverflow.com/questions/43220321/electron-pdf-viewer) like:
--browserwindow-options "{ \"webPreferences\": { \"plugins\": true } }"
without success.
Yes, this is an issue. According to Electron docs, enabling
webPreferences: {
plugins: true
}
would be enough to allow the PDF to be shown in the iframes, but it doesn't work.
Any suggestions?
Thanks.
I got it working by using electron 9 beta (-e param).
Stable release of electron v9 will be in a few days.
I got it working by using electron 9 beta (-e param).
Stable release of electron v9 will be in a few days.
@cyptus thanks, good to know! Will default to 9 a few weeks after it's released.
electron v9 stable has been released yesterday (https://www.electronjs.org/blog/electron-9-0).
see also https://github.com/electron/electron/pull/22131 which should be the issue that fixed this issue.
nativefier argument "-e 9.0.0" is still needed for me.
i think we can close this.
electron v9 stable has been released yesterday (https://www.electronjs.org/blog/electron-9-0).
see also electron/electron#22131 which should be the issue that fixed this issue.nativefier argument "-e 9.0.0" is still needed for me.
i think we can close this.
@cyptus thanks! I just released Nativefier v9.0.0 which defaults to Electron 9.0.4