internal static void get_pdf_paper_size(IntPtr gcHandlePtr, out IntPtr __retval, int device_units_per_inch)
        {
            var self = (CfxPrintHandler)System.Runtime.InteropServices.GCHandle.FromIntPtr(gcHandlePtr).Target;

            if (self == null || self.CallbacksDisabled)
            {
                __retval = default(IntPtr);
                return;
            }
            var e = new CfxGetPdfPaperSizeEventArgs(device_units_per_inch);

            self.m_GetPdfPaperSize?.Invoke(self, e);
            e.m_isInvalid = true;
            __retval      = CfxSize.Unwrap(e.m_returnValue);
        }
Exemple #2
0
 /// <summary>
 /// Set the printer printable area in device units. Some platforms already
 /// provide flipped area. Set |landscapeNeedsFlip| to false (0) on those
 /// platforms to avoid double flipping.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_print_settings_capi.h">cef/include/capi/cef_print_settings_capi.h</see>.
 /// </remarks>
 public void SetPrinterPrintableArea(CfxSize physicalSizeDeviceUnits, CfxRect printableAreaDeviceUnits, bool landscapeNeedsFlip)
 {
     CfxApi.PrintSettings.cfx_print_settings_set_printer_printable_area(NativePtr, CfxSize.Unwrap(physicalSizeDeviceUnits), CfxRect.Unwrap(printableAreaDeviceUnits), landscapeNeedsFlip ? 1 : 0);
 }
 /// <summary>
 /// Enable notifications of auto resize via
 /// CfxDisplayHandler.OnAutoResize. Notifications are disabled by default.
 /// |minSize| and |maxSize| define the range of allowed sizes.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_browser_capi.h">cef/include/capi/cef_browser_capi.h</see>.
 /// </remarks>
 public void SetAutoResizeEnabled(bool enabled, CfxSize minSize, CfxSize maxSize)
 {
     CfxApi.BrowserHost.cfx_browser_host_set_auto_resize_enabled(NativePtr, enabled ? 1 : 0, CfxSize.Unwrap(minSize), CfxSize.Unwrap(maxSize));
 }