private int on_print_job(cef_print_handler_t *self, cef_string_t *document_name, cef_string_t *pdf_file_path, cef_print_job_callback_t *callback) { CheckSelf(self); var m_documentName = cef_string_t.ToString(document_name); var m_pdfFilePath = cef_string_t.ToString(pdf_file_path); var m_callback = CefPrintJobCallback.FromNative(callback); var m_result = OnPrintJob(m_documentName, m_pdfFilePath, m_callback); return(m_result ? 1 : 0); }
/// <summary> /// Send the print job to the printer. Execute |callback| once the job is /// completed. Return true if the job will proceed or false to cancel the job /// immediately. /// </summary> protected abstract bool OnPrintJob(string documentName, string pdfFilePath, CefPrintJobCallback callback);