I have a C# application that use MySql database. I built a report using HTML.
I fill string attribute with tags and send the content to a WebBrowser control in a new form.
The report appear correctly, but when I call print preview dialog,
webBrowser1.ShowPrintPreviewDialog();
the header and footer appear in the report with values:
- In header: # of pages.
- In footer: Date and "about:blank".
This is a screenshot for the issue:
How could I remove the header and footer?
Looks like you may have to change registry settings before printing, then change them back again:
How To Programmatically Change Printer Settings for Internet Explorer and WebBrowser Control by Using Visual C# .NET
https://support.microsoft.com/en-us/kb/313723