source: wkhtmltox/trunk/fuentes/include/wkhtmltox/pdf.h @ 51

Last change on this file since 51 was 51, checked in by mabarracus, 4 years ago

wip

File size: 3.9 KB
Line 
1/*
2 * Copyright 2010 wkhtmltopdf authors
3 *
4 * This file is part of wkhtmltopdf.
5 *
6 * wkhtmltopdf is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * wkhtmltopdf is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with wkhtmltopdf.  If not, see <http: *www.gnu.org/licenses/>.
18 */
19
20#ifndef __PDF_H__
21#define __PDF_H__
22#include <wkhtmltox/dllbegin.inc>
23
24struct wkhtmltopdf_global_settings;
25typedef struct wkhtmltopdf_global_settings wkhtmltopdf_global_settings;
26
27struct wkhtmltopdf_object_settings;
28typedef struct wkhtmltopdf_object_settings wkhtmltopdf_object_settings;
29
30struct wkhtmltopdf_converter;
31typedef struct wkhtmltopdf_converter wkhtmltopdf_converter;
32
33typedef void (*wkhtmltopdf_str_callback)(wkhtmltopdf_converter * converter, const char * str);
34typedef void (*wkhtmltopdf_int_callback)(wkhtmltopdf_converter * converter, const int val);
35typedef void (*wkhtmltopdf_void_callback)(wkhtmltopdf_converter * converter);
36
37CAPI(int) wkhtmltopdf_init(int use_graphics);
38CAPI(int) wkhtmltopdf_deinit();
39CAPI(int) wkhtmltopdf_extended_qt();
40CAPI(const char *) wkhtmltopdf_version();
41
42CAPI(wkhtmltopdf_global_settings *) wkhtmltopdf_create_global_settings();
43CAPI(void) wkhtmltopdf_destroy_global_settings(wkhtmltopdf_global_settings *);
44
45CAPI(wkhtmltopdf_object_settings *) wkhtmltopdf_create_object_settings();
46CAPI(void) wkhtmltopdf_destroy_object_settings(wkhtmltopdf_object_settings *);
47
48CAPI(int) wkhtmltopdf_set_global_setting(wkhtmltopdf_global_settings * settings, const char * name, const char * value);
49CAPI(int) wkhtmltopdf_get_global_setting(wkhtmltopdf_global_settings * settings, const char * name, char * value, int vs);
50CAPI(int) wkhtmltopdf_set_object_setting(wkhtmltopdf_object_settings * settings, const char * name, const char * value);
51CAPI(int) wkhtmltopdf_get_object_setting(wkhtmltopdf_object_settings * settings, const char * name, char * value, int vs);
52
53
54CAPI(wkhtmltopdf_converter *) wkhtmltopdf_create_converter(wkhtmltopdf_global_settings * settings);
55CAPI(void) wkhtmltopdf_destroy_converter(wkhtmltopdf_converter * converter);
56
57CAPI(void) wkhtmltopdf_set_warning_callback(wkhtmltopdf_converter * converter, wkhtmltopdf_str_callback cb);
58CAPI(void) wkhtmltopdf_set_error_callback(wkhtmltopdf_converter * converter, wkhtmltopdf_str_callback cb);
59CAPI(void) wkhtmltopdf_set_phase_changed_callback(wkhtmltopdf_converter * converter, wkhtmltopdf_void_callback cb);
60CAPI(void) wkhtmltopdf_set_progress_changed_callback(wkhtmltopdf_converter * converter, wkhtmltopdf_int_callback cb);
61CAPI(void) wkhtmltopdf_set_finished_callback(wkhtmltopdf_converter * converter, wkhtmltopdf_int_callback cb);
62/* CAPI(void) wkhtmltopdf_begin_conversion(wkhtmltopdf_converter * converter); */
63/* CAPI(void) wkhtmltopdf_cancel(wkhtmltopdf_converter * converter); */
64CAPI(int) wkhtmltopdf_convert(wkhtmltopdf_converter * converter);
65CAPI(void) wkhtmltopdf_add_object(
66        wkhtmltopdf_converter * converter, wkhtmltopdf_object_settings * setting, const char * data);
67
68CAPI(int) wkhtmltopdf_current_phase(wkhtmltopdf_converter * converter);
69CAPI(int) wkhtmltopdf_phase_count(wkhtmltopdf_converter * converter);
70CAPI(const char *) wkhtmltopdf_phase_description(wkhtmltopdf_converter * converter, int phase);
71CAPI(const char *) wkhtmltopdf_progress_string(wkhtmltopdf_converter * converter);
72CAPI(int) wkhtmltopdf_http_error_code(wkhtmltopdf_converter * converter);
73CAPI(long) wkhtmltopdf_get_output(wkhtmltopdf_converter * converter, const unsigned char **);
74
75#include <wkhtmltox/dllend.inc>
76#endif /*__PDF_H__*/
Note: See TracBrowser for help on using the repository browser.