public byte[] GetConversionResult(IntPtr converter) { var length = WkHtmlToXBindings.wkhtmltopdf_get_output(converter, out var resultPointer); var result = new byte[length]; Marshal.Copy(resultPointer, result, 0, length); return(result); }
public void Load() { if (isLoaded) { return; } if (WkHtmlToXBindings.wkhtmltopdf_init(0) == 1) { isLoaded = true; } }
public void Dispose() { WkHtmlToXBindings.wkhtmltopdf_deinit(); }
public string GetProgressString(IntPtr converter) { return(Marshal.PtrToStringAnsi(WkHtmlToXBindings.wkhtmltopdf_progress_string(converter))); }
public string GetPhaseDescription(IntPtr converter, int phase) { return(Marshal.PtrToStringAnsi(WkHtmlToXBindings.wkhtmltopdf_phase_description(converter, phase))); }
public int GetCurrentPhase(IntPtr converter) { return(WkHtmlToXBindings.wkhtmltopdf_current_phase(converter)); }
public IntPtr CreateConverter(IntPtr globalSettings) { return(WkHtmlToXBindings.wkhtmltopdf_create_converter(globalSettings)); }
public int SetGlobalSetting(IntPtr settings, string name, string value) { return(WkHtmlToXBindings.wkhtmltopdf_set_global_setting(settings, name, value)); }
public int SetFinishedCallback(IntPtr converter, IntCallback callback) { return(WkHtmlToXBindings.wkhtmltopdf_set_finished_callback(converter, callback)); }
public int SetProgressChangedCallback(IntPtr converter, VoidCallback callback) { return(WkHtmlToXBindings.wkhtmltopdf_set_progress_changed_callback(converter, callback)); }
public void DestroyConverter(IntPtr converter) { WkHtmlToXBindings.wkhtmltopdf_destroy_converter(converter); }
public bool DoConversion(IntPtr converter) { return(WkHtmlToXBindings.wkhtmltopdf_convert(converter)); }
public void AddObject(IntPtr converter, IntPtr objectSettings, byte[] data) { WkHtmlToXBindings.wkhtmltopdf_add_object(converter, objectSettings, data); }
public string GetLibraryVersion() { return(Marshal.PtrToStringAnsi(WkHtmlToXBindings.wkhtmltopdf_version())); }
public int SetErrorCallback(IntPtr converter, StringCallback callback) { return(WkHtmlToXBindings.wkhtmltopdf_set_error_callback(converter, callback)); }
public IntPtr CreateGlobalSettings() { return(WkHtmlToXBindings.wkhtmltopdf_create_global_settings()); }
public int GetPhaseCount(IntPtr converter) { return(WkHtmlToXBindings.wkhtmltopdf_phase_count(converter)); }
public IntPtr CreateObjectSettings() { return(WkHtmlToXBindings.wkhtmltopdf_create_object_settings()); }
public int SetObjectSetting(IntPtr settings, string name, string value) { return(WkHtmlToXBindings.wkhtmltopdf_set_object_setting(settings, name, value)); }