I'm using electron 3.0.0, and react. I need to show a pdf inside one of my react components. I've tried:
https://github.com/electron/electron/issues/11065
Unsuccessfully.
I used this 3 tags, none work
<object type="text/html" data={artist.getPdf()} width="100%" height="500" plugins="true"/>
<iframe src={artist.getPdf()} width="100%" height="500" />
<webview src={artist.getPdf()} plugins="true" width="100%" height="500"></webview>
All of this attempt to download the file, I just wanna show it inside a element.
In the electron.js file I put:
mainWindow = new BrowserWindow({
...
webPreferences: {
plugins: true
}
})