I am creating a dialog based application with a CWebBrowser2 control. I need to print the page displayed in the browser in landscape or portrait format without displaying the PrintDialog. Landscape or Portrait is decided by some other inputs.
I have two methods in my App class for setting the orientation and for starting the printing. Now the probelm for me is how to get the content in the browser or in other words how to get the html displayed in the browser? what to do after a m_Browser.GetDocument() call ?? I dont know how I can associate the html with DOCINFO structure ( setting the file name does not work of course). Landscape/Portrait modes and a dc.TextOut() for a hardcoded string works fine. But how to print the html displayed in the browser?
Please note: setting the orientation and using the ExecWb() function does not work because I am always getting portrait mode only.
Excpecting your valuable comments. Thanks.