PrintToPdf as byte array

25 views
Skip to first unread message

RJL

unread,
May 16, 2017, 10:23:20 PM5/16/17
to CefSharp
I only recently discovered CefSharp after spending several weeks trying to integrate the Qt WebEnginePage into a .NET application using C++/CLI.  

I realize that Qt is using a different rendering engine than CEF, but the APIs appear quite similar so I'm curious if one of the features I made use of in Qt can also be added to CefSharp.

The QWebEnginePage class actually has two PrintToPdf methods; one that writes directly to a specified file, the other allows you to pass a Lambda expression or functor which accepts the PDF output as an array of bytes.

This feature is useful in those applications where one wishes to apply filters or modifications to the PDF stream using something like iTextSharp.  I looked in the source code for both CefSharp and CEF but couldn't find a native function that works this way.

Question 1:  Is there something I might have missed when examining the code?
Question 2:  If not, is this something that would be easy to add?  I thought I'd try to modify my Qt C++/CLI which uses a delegate to pass the byte array to other .NET classes for this purpose.

Rob
Reply all
Reply to author
Forward
0 new messages