mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add PDF printing support (issue #1478).
This commit is contained in:
committed by
Marshall Greenblatt
parent
b6e5310bce
commit
85f83680d7
@@ -12,6 +12,7 @@
|
||||
|
||||
#include "libcef_dll/cpptoc/client_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/pdf_print_callback_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/browser_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/browser_host_ctocpp.h"
|
||||
@@ -265,6 +266,28 @@ void CefBrowserHostCToCpp::Print() {
|
||||
_struct->print(_struct);
|
||||
}
|
||||
|
||||
void CefBrowserHostCToCpp::PrintToPDF(const CefString& path,
|
||||
const CefPdfPrintSettings& settings,
|
||||
CefRefPtr<CefPdfPrintCallback> callback) {
|
||||
cef_browser_host_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, print_to_pdf))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: path; type: string_byref_const
|
||||
DCHECK(!path.empty());
|
||||
if (path.empty())
|
||||
return;
|
||||
// Unverified params: callback
|
||||
|
||||
// Execute
|
||||
_struct->print_to_pdf(_struct,
|
||||
path.GetStruct(),
|
||||
&settings,
|
||||
CefPdfPrintCallbackCppToC::Wrap(callback));
|
||||
}
|
||||
|
||||
void CefBrowserHostCToCpp::Find(int identifier, const CefString& searchText,
|
||||
bool forward, bool matchCase, bool findNext) {
|
||||
cef_browser_host_t* _struct = GetStruct();
|
||||
|
Reference in New Issue
Block a user