Beispiel #1
0
        public int wkhtmltopdf_get_object_setting(IntPtr settings,
                                                  [MarshalAs((short)CustomUnmanagedType.LPUTF8Str)]
                                                  string name,
                                                  byte[] array)
        {
            int    size = Marshal.SizeOf(array[0]) * array.Length;
            IntPtr pnt  = Marshal.AllocHGlobal(size);

            try
            {
                // Copy the array to unmanaged memory.
                Marshal.Copy(array, 0, pnt, array.Length);

                return(WkHtmlBindings.wkhtmltopdf_get_object_setting(settings, name, pnt, size));
            }
            finally
            {
                // Free the unmanaged memory.
                Marshal.FreeHGlobal(pnt);
            }
        }
Beispiel #2
0
 public int wkhtmltopdf_get_output(IntPtr converter, out IntPtr data) => WkHtmlBindings.wkhtmltopdf_get_output(converter, out data);
Beispiel #3
0
 public void wkhtmltopdf_add_object(IntPtr converter,
                                    IntPtr objectSettings,
                                    byte[] data) => WkHtmlBindings.wkhtmltopdf_add_object(converter, objectSettings, data);
Beispiel #4
0
 public int wkhtmltopdf_set_finished_callback(IntPtr converter, [MarshalAs(UnmanagedType.FunctionPtr)] IntCallback callback) => WkHtmlBindings.wkhtmltopdf_set_finished_callback(converter, callback);
Beispiel #5
0
 public IntPtr wkhtmltopdf_version() => WkHtmlBindings.wkhtmltopdf_version();
Beispiel #6
0
 public int wkhtmltopdf_phase_count(IntPtr converter) => WkHtmlBindings.wkhtmltopdf_phase_count(converter);
Beispiel #7
0
 public IntPtr wkhtmltopdf_progress_string(IntPtr converter) => WkHtmlBindings.wkhtmltopdf_progress_string(converter);
Beispiel #8
0
 public int wkhtmltopdf_current_phase(IntPtr converter) => WkHtmlBindings.wkhtmltopdf_current_phase(converter);
Beispiel #9
0
 public int wkhtmltopdf_deinit() => WkHtmlBindings.wkhtmltopdf_deinit();
Beispiel #10
0
 public IntPtr wkhtmltopdf_create_global_settings() => WkHtmlBindings.wkhtmltopdf_create_global_settings();
Beispiel #11
0
 public IntPtr wkhtmltopdf_create_object_settings() => WkHtmlBindings.wkhtmltopdf_create_object_settings();
Beispiel #12
0
 public IntPtr wkhtmltopdf_create_converter(IntPtr globalSettings) => WkHtmlBindings.wkhtmltopdf_create_converter(globalSettings);
Beispiel #13
0
 public bool wkhtmltopdf_convert(IntPtr converter) => WkHtmlBindings.wkhtmltopdf_convert(converter);
Beispiel #14
0
 public void wkhtmltopdf_add_object(IntPtr converter,
                                    IntPtr objectSettings,
                                    [MarshalAs((short)CustomUnmanagedType.LPUTF8Str)] string data) => WkHtmlBindings.wkhtmltopdf_add_object(converter, objectSettings, data);
Beispiel #15
0
 public int wkhtmltopdf_http_error_code(IntPtr converter) => WkHtmlBindings.wkhtmltopdf_http_error_code(converter);
Beispiel #16
0
 public void wkhtmltopdf_destroy_converter(IntPtr converter) => WkHtmlBindings.wkhtmltopdf_destroy_converter(converter);
Beispiel #17
0
 public int wkhtmltopdf_init(int useGraphics) => WkHtmlBindings.wkhtmltopdf_init(useGraphics);
Beispiel #18
0
 public int wkhtmltopdf_destroy_global_settings(IntPtr settings) => WkHtmlBindings.wkhtmltopdf_destroy_global_settings(settings);
Beispiel #19
0
 public IntPtr wkhtmltopdf_phase_description(IntPtr converter, int phase) => WkHtmlBindings.wkhtmltopdf_phase_description(converter, phase);
Beispiel #20
0
 public int wkhtmltopdf_destroy_object_settings(IntPtr settings) => WkHtmlBindings.wkhtmltopdf_destroy_object_settings(settings);
Beispiel #21
0
 public int wkhtmltopdf_set_error_callback(IntPtr converter, [MarshalAs(UnmanagedType.FunctionPtr)] StringCallback callback) => WkHtmlBindings.wkhtmltopdf_set_error_callback(converter, callback);
Beispiel #22
0
 public int wkhtmltopdf_extended_qt() => WkHtmlBindings.wkhtmltopdf_extended_qt();
Beispiel #23
0
 public int wkhtmltopdf_set_global_setting(IntPtr settings,
                                           [MarshalAs((short)CustomUnmanagedType.LPUTF8Str)]
                                           string name,
                                           [MarshalAs((short)CustomUnmanagedType.LPUTF8Str)]
                                           string value) => WkHtmlBindings.wkhtmltopdf_set_global_setting(settings, name, value);
Beispiel #24
0
 public int wkhtmltopdf_set_progress_changed_callback(IntPtr converter, [MarshalAs(UnmanagedType.FunctionPtr)] VoidCallback callback) => WkHtmlBindings.wkhtmltopdf_set_progress_changed_callback(converter, callback);