How to remove the header / footer print on htmlviewer on Windows OS?

On Windows, i got this annoying header and/or footer (depends of the os) with the file path and the title of the document(html)

file:///C:/Users/IEUser/Desktop/myfile.html

any idea how to remove that on Windows OS ?

Possibly changing the renderer to WebKit might help.
Otherwise, it’s kind of an internet explorer thing so I’m not sure if the user would have to change their IE settings or if you would have to use declares to handle it in your app.

You load document with LoadPage method?

You can try to set

@page { size: auto; margin: 0; }

if you have access to the css.

Marius

Christian : HTMLViewer.LoadPage ( Source As String, RelativeTo As FolderItem )
the source string is an xslt/xml parsed document (generate a simple html) and the folderitem

Marius : still there

Tim : already webkit…

The only other way I know is the Registry
You have to read, save, set empty, print and set it back
Key: Computer\HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PageSetup

It would be better to use PDF

Marius, apparently I was mistaken and OP is using WebKit so I’m not sure the IE key will help :frowning:

Only workaround now is to switch to Mac, right? :wink:

Tim : i wish ! but half of my clients are PC users…

Marius : PDF licences are very expensive ! Note if you print to a virtual printer (PDF Writer), the header still show

I do that with Xojo-Report and that works fine…
It automated creates PDFs with virtual Printer and sends them via email.

Has anyone ever found a good way to do this using the latest Native renderer (not WebKit) on Windows desktop apps? Does IE 11 understand any css that will do this?