cloudtrends / chromiumembedded

Automatically exported from code.google.com/p/chromiumembedded
1 stars 1 forks source link

Printing frame #141

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It is more of a question than an issue. Is it possible to print any other 
frame/dialog in the application other than the dialogs that have cef browser 
using cef's print functionality?
May be by passing the DC/frame/window to be printed to cef's print function.

Original issue reported on code.google.com by pulkitru...@gmail.com on 5 Nov 2010 at 9:26

GoogleCodeExporter commented 9 years ago
Printing is executed using CefFrame::Print() -- you can print from any 
CefFrame. The printing implementation lives in browser_impl_win.cc 
CefBrowserImpl::UIT_PrintPages().  It's dependent on skia and WebKit so it 
wouldn't be very useful for anything other than browser frames.

In a pinch you could take a screen shot of your non-CEF dialog, load it in a 
CefFrame (potentially off-screen) and print from there. Or, even better, create 
a print-friendly version of your dialog contents as an HTML document and print 
that instead.

In the future, please ask these kinds of questions on the CEF Forum.

Original comment by magreenb...@gmail.com on 6 Nov 2010 at 12:11