Integration of print to PDF like chrome in CefSharp

2,849 views
Skip to first unread message

Chinmay Kulkarni

unread,
Mar 4, 2013, 1:38:16 AM3/4/13
to cefs...@googlegroups.com
I want to know if there are any options available for giving a chrome like print feature in CefSharp for winforms.
My primary requirement is printing a web page to PDF with a print preview.

If there are no options available then are there any plans for implementing a proper print functionality in CefSharp ? 

anthony taranto

unread,
Mar 4, 2013, 2:15:02 PM3/4/13
to cefs...@googlegroups.com
You should be able to call IWebBrowser.Print() to display the windows system print dialog. What other functionality do you require?

--Anthony

--
You received this message because you are subscribed to the Google Groups "CefSharp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cefsharp+u...@googlegroups.com.
To post to this group, send email to cefs...@googlegroups.com.
Visit this group at http://groups.google.com/group/cefsharp?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Chinmay Kulkarni

unread,
Mar 18, 2013, 1:33:13 PM3/18/13
to cefs...@googlegroups.com
Yes I could do that, but I'm looking for a solution similar to chrome's print functionality. It should be integrated with browser, when I say print it should open up a print preview dialog which should have an option for saving it to PDF. Any pointers for getting this done ?

anthony taranto

unread,
Mar 18, 2013, 2:33:46 PM3/18/13
to cefs...@googlegroups.com
This would be a reasonably labor intensive effort. Take a look at the offscreen rendering code in the WPF WebView control, which you can use to get the current page's image data.

--Anthony

richard Boyewa

unread,
Mar 19, 2013, 12:21:32 AM3/19/13
to cefs...@googlegroups.com
Can this only be done in WPF WebView? It should be possible on WinForm too.

Ganesh Nagargoje

unread,
Jul 19, 2013, 6:05:26 AM7/19/13
to cefs...@googlegroups.com

Could you please post an example for CefSharp.wpf lib using C# for method SetBuffer?  I want to write an image from rendered html in WebView.
Reply all
Reply to author
Forward
0 new messages