Answer by ESSAADI_ ELMEHDI for Electron: print iframe given reference to it
I am writing this answer to address a minor issue that you might encounter when following the advice in the Hutt's answer. The character encoding can be lost when creating the blob, which can cause...
View ArticleAnswer by Shaaa for Electron: print iframe given reference to it
Adding on to the previous answer : It would be good idea to close the window programmatically, even when "show: false". It will take up resources. win?.close();While minimized or hidden, BrowserWindows...
View ArticleElectron: print iframe given reference to it
I would like to use the react-to-print library to print an iframe from my Electron app. How can I use the iframe reference to get the correct window/element to print?const handleElectronPrint = async...
View ArticleAnswer by the Hutt for Electron: print iframe given reference to it
You need to convert the iframe object to Data URL. And load the URL in a new hidden BrowserWindow object.Build data URL in Renderer process and send the URL to Main process using preload. In main...
View Article