Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><a href="http://support.microsoft.com/kb/267240" rel="nofollow noreferrer">This MSKB article</a> should help with headers/footers. Regarding the rendering issues, I would expect <code>FEATURE_BROWSER_EMULATION</code> to have solved those, but I've already suggested that in the comments to <a href="https://stackoverflow.com/q/19024279/1768303">another question of yours</a>. Have you verified that browser emulation actually works? If it does, the following should show <code>CSS1Compact</code> for <code>compatMode</code>, and <code>10</code> or <code>9</code> for <code>documentMode</code> (depending on your IE version). The document must have both <code>&lt;!DOCTYPE html&gt;</code> and <code>&lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;</code> declarations for this to work:</p> <pre><code>dynamic document = this.webBrowser.Document.DomDocument; dynamic navigator = document.parentWindow.navigator; var info = "\n navigator.userAgent: " + navigator.userAgent + "\n navigator.appName: " + navigator.appName + "\n document.documentMode: " + document.documentMode + "\n document.compatMode: " + document.compatMode; MessageBox.Show(info); </code></pre> <p><strong>[EDITED]</strong> To control printing layout beyond <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@media" rel="nofollow noreferrer">@media CSS</a>, you could implement your own <a href="http://msdn.microsoft.com/en-us/library/aa753280%28v=vs.85%29.aspx" rel="nofollow noreferrer">Internet Explorer Print Template</a>. That would provide full control over headers, margins, columns, etc. This feature is flexible, but not trival to implement. Some relevant resources:</p> <ul> <li><a href="http://msdn.microsoft.com/en-us/library/bb250434%28VS.85%29.aspx" rel="nofollow noreferrer">Beyond Print Preview: Print Customization for Internet Explorer 5.5</a></li> <li><a href="http://www.webreference.com/js/column89/index.html" rel="nofollow noreferrer">Print Templates, Part I</a></li> <li><a href="http://marc.durdin.net/2011/07/demystifying-printing-with-the-microsoft-webbrowser-control-and-showhtmldialogex-2/" rel="nofollow noreferrer">Demystifying printing with the Microsoft WebBrowser control and ShowHTMLDialogEx</a></li> <li><a href="https://stackoverflow.com/q/18926793/1768303">Add support to print &amp; preview HTML in a dialog-based MFC app</a></li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload