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:

enter image description here

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(); } 

enter image description here


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -