I currently have a WebBrowser
control in my VB.NET project being created below:
Private Sub SomeSubToPrintHTMLViaWebBrowser()
' strDocument is the giant blob of HTML text that can be seen in the jsFiddle linked later in the question.
Dim webBrowserHidden As New WebBrowser
AddHandler webBrowserHidden.DocumentCompleted, New WebBrowserDocumentCompletedEventHandler(AddressOf PrintDocument)
webBrowserHidden.DocumentText = strDocument
End Sub
However when I use the .Print
or .ShowPrintDialog
methods of the WebBrowser, the page is coming out malformed even though when I load the HTML coding as a webpage in either IE, Edge, Chrome, or Firefox, it works perfectly fine. The coding was also validated as "proper" by the W3C Online Validator.
So what I would like to know is, what engine is WebBrowser
using to render pages?
Here is the HTML/CSS coding that I'm trying to run