Hi
I am using C# WPF webbrowser control to show html file in my local machine, I added a print feature to my application by executing print command of webbrowser control
I did it once (sorry, I don't have the application code now), and I did it playing with the register: check this MS article.
I advice you to store somewhere the current values of the keys and restore them after you're done printing.
EDIT
string keyName = @"Software\Microsoft\Internet Explorer\PageSetup";
using (RegistryKey key = Registry.CurrentUser.OpenSubKey(keyName, true)) {
if (key != null) {
string old_footer = key.GetValue("footer");
string old_header = key.GetValue("header");
key.SetValue("footer", "");
key.SetValue("header", "");
Print();
key.SetValue("footer", old_footer);
key.SetValue("header", old_header);
}
}
About pages being cut
I'm not sure if I understood correctly what the problem is... in the application I was talking about before, I had the problem of tables being cut in half, so I played with CSS break after property (see also break before) to force page breaks, specifying special styles for the printer media. Hope this helps...