c# - Remove header and footer when printing from WebBrowser control -
i have c# application use mysql database. built report using html.
i fill string attribute tags , send content webbrowser control in new form.
the report appear correctly, when call print preview dialog,
webbrowser1.showprintpreviewdialog();   the header , footer appear in report values:
- in header: # of pages.
 - in footer: date , "about:blank".
 
this screenshot issue:
how remove header , footer?
looks may have change registry settings before printing, change them again:
how programmatically change printer settings internet explorer , webbrowser control using visual c# .net
https://support.microsoft.com/en-us/kb/313723
using microsoft.win32; //...............................  public  void iesetupfooter() {      string strkey  =  "software\\microsoft\\internet explorer\\pagesetup";     bool bolwritable = true;     string strname = "footer";         object ovalue = "test footer";     registrykey okey  = registry.currentuser.opensubkey(strkey,bolwritable);     console.write (strkey);     okey.setvalue(strname,ovalue);     okey.close(); }   

Comments
Post a Comment