wailsapp / wails

Create beautiful applications using Go
https://wails.io
MIT License
23.25k stars 1.1k forks source link

Url and app name on print #3566

Open OHELLEL opened 1 week ago

OHELLEL commented 1 week ago

I need to print html content using window.print without having "https://wails.local" showing on paper, most users will find it weird and most of them need guidance to hide it using the native print preview window. I need to hide it programmatically.

leaanthony commented 2 days ago

I had a look into this. At least on Windows, it appears that you can disable the headers and footers in the UI. There doesn't appear to be a way to set that before the UI shows, which is crazy, because you can silently print with your own preferences (including disabling headers) but then you don't get the preview UI. If you find out a way to do it, let me know 👍

OHELLEL commented 2 days ago

On electron I generate a pdf from the main window with my own preferences silently and then I feed it's data back into a child window that acts as print preview, So all I need is :