I needed to create an Electron application to access a web page (due to the “super powers” that Node.js gives me to change the DOM).
But this page generates a PDF for printing. Opening in a new window… The HTML / JS default.
But when the user presses the button to print or download the PDF, the child window freezes. It does not print or download the PDF.
How can I prevent the default download button action and create a print function?
PS¹: I tried to use BrowserWindow.webContents.printToPDF () following the official documentation.
PS²: Remembering that I do not have direct access to the source of the site. : \