Hi,
we are currently using a winforms WebBrowser control in our app in a WindowsFormsHost and printing by calling 'WebBrowser.ShowPrintDialog()' We have an issue with this in that the dialog does not appear to be modal and the parent window can be dismissed causing issues if a print is later attempted.
I was looking at the new wpf webbrowser control in the hope that they will have fixed this issue when doing a similar thing themselves, but can find no way to print from it..
I found someone online talking of doing this:
PrintDialog printDialog = new PrintDialog();
printDialog.PrintDocument(((IDocumentPaginatorSource)webBrowser.Document).DocumentPaginator, "My App");
but this throws an exception as the WebBrowser.Document does not support the IDocumentPaginatorSource interface.
Is there any way I can print from the wpf web browser control?
thanks