IHTMLDocument2 Printing without Dialog Box
问题 I've been working on a project that automatically prints HTML invoices. It's been particularly challenging as I've needed to keep the CSS formatting. Following advice, I've found myself using IHTMLDocument2 to carry out my printing. I'm supposed to be able to: mshtml.IHTMLDocument2 doc = new mshtml.HTMLDocument() as mshtml.IHTMLDocument2; doc.write(htmlContent); //htmlContent is a string of HTML doc.execCommand("PRINT", false, null); The second argument specifies whether to produce the