00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef SPECTRE_DOCUMENT_H
00022 #define SPECTRE_DOCUMENT_H
00023
00024 #include <libspectre/spectre-macros.h>
00025 #include <libspectre/spectre-status.h>
00026 #include <libspectre/spectre-page.h>
00027
00028 SPECTRE_BEGIN_DECLS
00029
00031 typedef struct SpectreDocument SpectreDocument;
00032
00034 SpectreDocument *spectre_document_new (void);
00035
00041 void spectre_document_load (SpectreDocument *document,
00042 const char *filename);
00043
00047 SpectreStatus spectre_document_status (SpectreDocument *document);
00048
00052 void spectre_document_free (SpectreDocument *document);
00053
00058 unsigned int spectre_document_get_n_pages (SpectreDocument *document);
00059
00064 SpectreOrientation spectre_document_get_orientation (SpectreDocument *document);
00065
00071 const char *spectre_document_get_title (SpectreDocument *document);
00072
00078 const char *spectre_document_get_creator (SpectreDocument *document);
00079
00085 const char *spectre_document_get_for (SpectreDocument *document);
00086
00093 const char *spectre_document_get_creation_date (SpectreDocument *document);
00094
00099 const char *spectre_document_get_format (SpectreDocument *document);
00100
00105 int spectre_document_is_eps (SpectreDocument *document);
00106
00112 unsigned int spectre_document_get_language_level (SpectreDocument *document);
00113
00119 SpectrePage *spectre_document_get_page (SpectreDocument *document,
00120 unsigned int page_index);
00121
00127 SpectrePage *spectre_document_get_page_by_label (SpectreDocument *document,
00128 const char *label);
00129
00140 void spectre_document_render_full (SpectreDocument *document,
00141 SpectreRenderContext *rc,
00142 unsigned char **page_data,
00143 int *row_length);
00144
00156 void spectre_document_render (SpectreDocument *document,
00157 unsigned char **page_data,
00158 int *row_length);
00159
00160
00161
00162
00163
00164
00165
00166 void spectre_document_get_page_size (SpectreDocument *document,
00167 int *width,
00168 int *height);
00169
00175 void spectre_document_save (SpectreDocument *document,
00176 const char *filename);
00177
00178
00179
00180
00181
00182 void spectre_document_save_to_pdf (SpectreDocument *document,
00183 const char *filename);
00184 SPECTRE_END_DECLS
00185
00186 #endif