internal static CefPdfPrintSettings FromNative(cef_pdf_print_settings_t *ptr)
 {
     return(new CefPdfPrintSettings
     {
         HeaderFooterTitle = cef_string_t.ToString(&ptr->header_footer_title),
         HeaderFooterUrl = cef_string_t.ToString(&ptr->header_footer_url),
         PageWidth = ptr->page_width,
         PageHeight = ptr->page_height,
         MarginTop = ptr->margin_top,
         MarginRight = ptr->margin_right,
         MarginBottom = ptr->margin_bottom,
         MarginLeft = ptr->margin_left,
         MarginType = ptr->margin_type,
         HeaderFooterEnabled = ptr->header_footer_enabled != 0,
         SelectionOnly = ptr->selection_only != 0,
         Landscape = ptr->landscape != 0,
         BackgroundsEnabled = ptr->backgrounds_enabled != 0,
     });
 }
Пример #2
0
 public static void Free(cef_pdf_print_settings_t *ptr)
 {
     Marshal.FreeHGlobal((IntPtr)ptr);
 }
Пример #3
0
 internal static void Clear(cef_pdf_print_settings_t *ptr)
 {
     libcef.string_clear(&ptr->header_footer_title);
     libcef.string_clear(&ptr->header_footer_url);
 }
Пример #4
0
 public unsafe extern void PrintToPdf([Immutable] cef_string_t *path, [Immutable] cef_pdf_print_settings_t *settings, cef_pdf_print_callback_t *callback);
 /// <summary>
 /// Print the current browser contents to the PDF file specified by |path| and
 /// execute |callback| on completion. The caller is responsible for deleting
 /// |path| when done. For PDF printing to work on Linux you must implement the
 /// CefPrintHandler::GetPdfPaperSize method.
 /// </summary>
 public void PrintToPDF(cef_string_t *path, cef_pdf_print_settings_t *settings, cef_pdf_print_callback_t *callback)
 {
     throw new NotImplementedException(); // TODO: CefBrowserHost.PrintToPDF
 }
 internal static void Free(cef_pdf_print_settings_t *ptr)
 {
     cef_pdf_print_settings_t.Free((cef_pdf_print_settings_t *)ptr);
 }