I have an application that uses a TWebBrowser to display an HTML report. I use a TCanvas, named PrintCanvas to print a page header, footer, and images. Now I'd like to add the content from the TWebBrowser to the canvas so that the HTML report is printed as well. I've tried copying the TWebBrowser content to a Bitmap, and then adding the Bitmap to my PrintCanvas. This works, but only shows the displayed portion of the TWebBrowser.
Is there a way I can copy an entire HTML report to a TCanvas? This would allow me to use my existing printing code. I'm okay with using a method other than the TWebBrowser, if there is a better way.
Another thing I have tried is using the TWebBrowser's ExecWB method to execute the OLECMDID_PRINT command, which opens the browser's print dialog box. This works, but this doesn't allow me to print the other information already on my PrintCanvas, such as the page header, footer, and images.