1/* poppler-document.h: glib interface to poppler
2 * Copyright (C) 2004, Red Hat, Inc.
3 *
4 * Copyright (C) 2016 Jakub Alba <jakubalba@gmail.com>
5 * Copyright (C) 2018, 2019, 2021, 2022 Marek Kasik <mkasik@redhat.com>
6 * Copyright (C) 2019 Masamichi Hosoda <trueroad@trueroad.jp>
7 * Copyright (C) 2021 André Guerreiro <aguerreiro1985@gmail.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2, or (at your option)
12 * any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
22 */
23
24#ifndef __POPPLER_DOCUMENT_H__
25#define __POPPLER_DOCUMENT_H__
26
27#include <glib-object.h>
28#include <gio/gio.h>
29#include "poppler.h"
30
31G_BEGIN_DECLS
32
33#define POPPLER_TYPE_DOCUMENT (poppler_document_get_type())
34#define POPPLER_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), POPPLER_TYPE_DOCUMENT, PopplerDocument))
35#define POPPLER_IS_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), POPPLER_TYPE_DOCUMENT))
36
37/**
38 * PopplerPageLayout:
39 * @POPPLER_PAGE_LAYOUT_UNSET: no specific layout set
40 * @POPPLER_PAGE_LAYOUT_SINGLE_PAGE: one page at a time
41 * @POPPLER_PAGE_LAYOUT_ONE_COLUMN: pages in one column
42 * @POPPLER_PAGE_LAYOUT_TWO_COLUMN_LEFT: pages in two columns with odd numbered pages on the left
43 * @POPPLER_PAGE_LAYOUT_TWO_COLUMN_RIGHT: pages in two columns with odd numbered pages on the right
44 * @POPPLER_PAGE_LAYOUT_TWO_PAGE_LEFT: two pages at a time with odd numbered pages on the left
45 * @POPPLER_PAGE_LAYOUT_TWO_PAGE_RIGHT: two pages at a time with odd numbered pages on the right
46 *
47 * Page layout types
48 */
49typedef enum
50{
51 POPPLER_PAGE_LAYOUT_UNSET,
52 POPPLER_PAGE_LAYOUT_SINGLE_PAGE,
53 POPPLER_PAGE_LAYOUT_ONE_COLUMN,
54 POPPLER_PAGE_LAYOUT_TWO_COLUMN_LEFT,
55 POPPLER_PAGE_LAYOUT_TWO_COLUMN_RIGHT,
56 POPPLER_PAGE_LAYOUT_TWO_PAGE_LEFT,
57 POPPLER_PAGE_LAYOUT_TWO_PAGE_RIGHT
58} PopplerPageLayout;
59
60/**
61 * PopplerPageMode:
62 * @POPPLER_PAGE_MODE_UNSET: no specific mode set
63 * @POPPLER_PAGE_MODE_NONE: neither document outline nor thumbnails visible
64 * @POPPLER_PAGE_MODE_USE_OUTLINES: document outline visible
65 * @POPPLER_PAGE_MODE_USE_THUMBS: thumbnails visible
66 * @POPPLER_PAGE_MODE_FULL_SCREEN: full-screen mode
67 * @POPPLER_PAGE_MODE_USE_OC: layers panel visible
68 * @POPPLER_PAGE_MODE_USE_ATTACHMENTS: attachments panel visible
69 *
70 * Page modes
71 */
72typedef enum
73{
74 POPPLER_PAGE_MODE_UNSET,
75 POPPLER_PAGE_MODE_NONE,
76 POPPLER_PAGE_MODE_USE_OUTLINES,
77 POPPLER_PAGE_MODE_USE_THUMBS,
78 POPPLER_PAGE_MODE_FULL_SCREEN,
79 POPPLER_PAGE_MODE_USE_OC,
80 POPPLER_PAGE_MODE_USE_ATTACHMENTS
81} PopplerPageMode;
82
83/**
84 * PopplerFontType:
85 * @POPPLER_FONT_TYPE_UNKNOWN: unknown font type
86 * @POPPLER_FONT_TYPE_TYPE1: Type 1 font type
87 * @POPPLER_FONT_TYPE_TYPE1C: Type 1 font type embedded in Compact Font Format (CFF) font program
88 * @POPPLER_FONT_TYPE_TYPE1COT: Type 1 font type embedded in OpenType font program
89 * @POPPLER_FONT_TYPE_TYPE3: A font type that is defined with PDF graphics operators
90 * @POPPLER_FONT_TYPE_TRUETYPE: TrueType font type
91 * @POPPLER_FONT_TYPE_TRUETYPEOT: TrueType font type embedded in OpenType font program
92 * @POPPLER_FONT_TYPE_CID_TYPE0: CIDFont type based on Type 1 font technology
93 * @POPPLER_FONT_TYPE_CID_TYPE0C: CIDFont type based on Type 1 font technology embedded in CFF font program
94 * @POPPLER_FONT_TYPE_CID_TYPE0COT: CIDFont type based on Type 1 font technology embedded in OpenType font program
95 * @POPPLER_FONT_TYPE_CID_TYPE2: CIDFont type based on TrueType font technology
96 * @POPPLER_FONT_TYPE_CID_TYPE2OT: CIDFont type based on TrueType font technology embedded in OpenType font program
97 *
98 * Font types
99 */
100typedef enum
101{
102 POPPLER_FONT_TYPE_UNKNOWN,
103 POPPLER_FONT_TYPE_TYPE1,
104 POPPLER_FONT_TYPE_TYPE1C,
105 POPPLER_FONT_TYPE_TYPE1COT,
106 POPPLER_FONT_TYPE_TYPE3,
107 POPPLER_FONT_TYPE_TRUETYPE,
108 POPPLER_FONT_TYPE_TRUETYPEOT,
109 POPPLER_FONT_TYPE_CID_TYPE0,
110 POPPLER_FONT_TYPE_CID_TYPE0C,
111 POPPLER_FONT_TYPE_CID_TYPE0COT,
112 POPPLER_FONT_TYPE_CID_TYPE2,
113 POPPLER_FONT_TYPE_CID_TYPE2OT
114} PopplerFontType;
115
116/**
117 * PopplerViewerPreferences:
118 * @POPPLER_VIEWER_PREFERENCES_UNSET: no preferences set
119 * @POPPLER_VIEWER_PREFERENCES_HIDE_TOOLBAR: hider toolbars when document is active
120 * @POPPLER_VIEWER_PREFERENCES_HIDE_MENUBAR: hide menu bar when document is active
121 * @POPPLER_VIEWER_PREFERENCES_HIDE_WINDOWUI: hide UI elements in document's window
122 * @POPPLER_VIEWER_PREFERENCES_FIT_WINDOW: resize document's window to fit the size of the first displayed page
123 * @POPPLER_VIEWER_PREFERENCES_CENTER_WINDOW: position the document's window in the center of the screen
124 * @POPPLER_VIEWER_PREFERENCES_DISPLAY_DOC_TITLE: display document title in window's title bar
125 * @POPPLER_VIEWER_PREFERENCES_DIRECTION_RTL: the predominant reading order for text is right to left
126 *
127 * Viewer preferences
128 */
129typedef enum /*< flags >*/
130{
131 POPPLER_VIEWER_PREFERENCES_UNSET = 0,
132 POPPLER_VIEWER_PREFERENCES_HIDE_TOOLBAR = 1 << 0,
133 POPPLER_VIEWER_PREFERENCES_HIDE_MENUBAR = 1 << 1,
134 POPPLER_VIEWER_PREFERENCES_HIDE_WINDOWUI = 1 << 2,
135 POPPLER_VIEWER_PREFERENCES_FIT_WINDOW = 1 << 3,
136 POPPLER_VIEWER_PREFERENCES_CENTER_WINDOW = 1 << 4,
137 POPPLER_VIEWER_PREFERENCES_DISPLAY_DOC_TITLE = 1 << 5,
138 POPPLER_VIEWER_PREFERENCES_DIRECTION_RTL = 1 << 6
139} PopplerViewerPreferences;
140
141/**
142 * PopplerPrintScaling:
143 * @POPPLER_PRINT_SCALING_APP_DEFAULT: application's default page scaling
144 * @POPPLER_PRINT_SCALING_NONE: no page scaling
145 *
146 * PrintScaling viewer preference
147 *
148 * Since: 0.73
149 */
150typedef enum
151{
152 POPPLER_PRINT_SCALING_APP_DEFAULT,
153 POPPLER_PRINT_SCALING_NONE
154} PopplerPrintScaling;
155
156/**
157 * PopplerPrintDuplex:
158 * @POPPLER_PRINT_DUPLEX_NONE: No preference on duplex printing
159 * @POPPLER_PRINT_DUPLEX_SIMPLEX: Print single-sided
160 * @POPPLER_PRINT_DUPLEX_DUPLEX_FLIP_SHORT_EDGE: Duplex and flip on the short edge of the sheet
161 * @POPPLER_PRINT_DUPLEX_DUPLEX_FLIP_LONG_EDGE: Duplex and flip on the long edge of the sheet
162 *
163 * Duplex viewer preference
164 *
165 * Since: 0.80
166 */
167typedef enum
168{
169 POPPLER_PRINT_DUPLEX_NONE,
170 POPPLER_PRINT_DUPLEX_SIMPLEX,
171 POPPLER_PRINT_DUPLEX_DUPLEX_FLIP_SHORT_EDGE,
172 POPPLER_PRINT_DUPLEX_DUPLEX_FLIP_LONG_EDGE
173} PopplerPrintDuplex;
174
175/**
176 * PopplerPermissions:
177 * @POPPLER_PERMISSIONS_OK_TO_PRINT: document can be printer
178 * @POPPLER_PERMISSIONS_OK_TO_MODIFY: document contents can be modified
179 * @POPPLER_PERMISSIONS_OK_TO_COPY: document can be copied
180 * @POPPLER_PERMISSIONS_OK_TO_ADD_NOTES: annotations can added to the document
181 * @POPPLER_PERMISSIONS_OK_TO_FILL_FORM: interactive form fields can be filled in
182 * @POPPLER_PERMISSIONS_OK_TO_EXTRACT_CONTENTS: extract text and graphics
183 * (in support of accessibility to users with disabilities or for other purposes). Since 0.18
184 * @POPPLER_PERMISSIONS_OK_TO_ASSEMBLE: assemble the document (insert, rotate, or delete pages and create
185 * bookmarks or thumbnail images). Since 0.18
186 * @POPPLER_PERMISSIONS_OK_TO_PRINT_HIGH_RESOLUTION: document can be printer at high resolution. Since 0.18
187 * @POPPLER_PERMISSIONS_FULL: document permits all operations
188 *
189 * Permissions
190 */
191/* clang-format off */
192typedef enum /*< flags >*/
193{
194 POPPLER_PERMISSIONS_OK_TO_PRINT = 1 << 0,
195 POPPLER_PERMISSIONS_OK_TO_MODIFY = 1 << 1,
196 POPPLER_PERMISSIONS_OK_TO_COPY = 1 << 2,
197 POPPLER_PERMISSIONS_OK_TO_ADD_NOTES = 1 << 3,
198 POPPLER_PERMISSIONS_OK_TO_FILL_FORM = 1 << 4,
199 POPPLER_PERMISSIONS_OK_TO_EXTRACT_CONTENTS = 1 << 5,
200 POPPLER_PERMISSIONS_OK_TO_ASSEMBLE = 1 << 6,
201 POPPLER_PERMISSIONS_OK_TO_PRINT_HIGH_RESOLUTION = 1 << 7,
202 POPPLER_PERMISSIONS_FULL = (POPPLER_PERMISSIONS_OK_TO_PRINT | POPPLER_PERMISSIONS_OK_TO_MODIFY | POPPLER_PERMISSIONS_OK_TO_COPY | POPPLER_PERMISSIONS_OK_TO_ADD_NOTES | POPPLER_PERMISSIONS_OK_TO_FILL_FORM | POPPLER_PERMISSIONS_OK_TO_EXTRACT_CONTENTS | POPPLER_PERMISSIONS_OK_TO_ASSEMBLE | POPPLER_PERMISSIONS_OK_TO_PRINT_HIGH_RESOLUTION)
203
204} PopplerPermissions;
205/* clang-format on */
206
207/**
208 * PopplerPDFSubtype:
209 * @POPPLER_PDF_SUBTYPE_UNSET: Null
210 * @POPPLER_PDF_SUBTYPE_PDF_A: ISO 19005 - Document management -- Electronic document file format for long-term preservation (PDF/A)
211 * @POPPLER_PDF_SUBTYPE_PDF_E: ISO 24517 - Document management -- Engineering document format using PDF (PDF/E)
212 * @POPPLER_PDF_SUBTYPE_PDF_UA: ISO 14289 - Document management applications -- Electronic document file format enhancement for accessibility (PDF/UA)
213 * @POPPLER_PDF_SUBTYPE_PDF_VT: ISO 16612 - Graphic technology -- Variable data exchange (PDF/VT)
214 * @POPPLER_PDF_SUBTYPE_PDF_X: ISO 15930 - Graphic technology -- Prepress digital data exchange (PDF/X)
215 * @POPPLER_PDF_SUBTYPE_NONE: Not compliant with the above standards
216 *
217 * PDF Subtype
218 *
219 * Since: 0.70
220 */
221typedef enum
222{
223 POPPLER_PDF_SUBTYPE_UNSET,
224 POPPLER_PDF_SUBTYPE_PDF_A,
225 POPPLER_PDF_SUBTYPE_PDF_E,
226 POPPLER_PDF_SUBTYPE_PDF_UA,
227 POPPLER_PDF_SUBTYPE_PDF_VT,
228 POPPLER_PDF_SUBTYPE_PDF_X,
229 POPPLER_PDF_SUBTYPE_NONE
230} PopplerPDFSubtype;
231
232/**
233 * PopplerPDFPart:
234 * @POPPLER_PDF_SUBTYPE_PART_UNSET: Null
235 * @POPPLER_PDF_SUBTYPE_PART_1: 1
236 * @POPPLER_PDF_SUBTYPE_PART_2: 2
237 * @POPPLER_PDF_SUBTYPE_PART_3: 3
238 * @POPPLER_PDF_SUBTYPE_PART_4: 4
239 * @POPPLER_PDF_SUBTYPE_PART_5: 5
240 * @POPPLER_PDF_SUBTYPE_PART_6: 6
241 * @POPPLER_PDF_SUBTYPE_PART_7: 7
242 * @POPPLER_PDF_SUBTYPE_PART_8: 8
243 * @POPPLER_PDF_SUBTYPE_PART_NONE: No part available
244 *
245 * PDF Subtype Part
246 *
247 * Since: 0.70
248 */
249typedef enum
250{
251 POPPLER_PDF_SUBTYPE_PART_UNSET,
252 POPPLER_PDF_SUBTYPE_PART_1,
253 POPPLER_PDF_SUBTYPE_PART_2,
254 POPPLER_PDF_SUBTYPE_PART_3,
255 POPPLER_PDF_SUBTYPE_PART_4,
256 POPPLER_PDF_SUBTYPE_PART_5,
257 POPPLER_PDF_SUBTYPE_PART_6,
258 POPPLER_PDF_SUBTYPE_PART_7,
259 POPPLER_PDF_SUBTYPE_PART_8,
260 POPPLER_PDF_SUBTYPE_PART_NONE
261} PopplerPDFPart;
262
263/**
264 * PopplerPDFConformance:
265 * @POPPLER_PDF_SUBTYPE_CONF_UNSET: Null
266 * @POPPLER_PDF_SUBTYPE_CONF_A: Level A (accessible) conformance (PDF/A)
267 * @POPPLER_PDF_SUBTYPE_CONF_B: Level B (basic) conformance (PDF/A)
268 * @POPPLER_PDF_SUBTYPE_CONF_G: Level G (external graphical content) (PDF/X)
269 * @POPPLER_PDF_SUBTYPE_CONF_N: Level N (external ICC Profile) (PDF/X)
270 * @POPPLER_PDF_SUBTYPE_CONF_P: Level P (ICC Profile) (PDF/X)
271 * @POPPLER_PDF_SUBTYPE_CONF_PG: Level PG (conjunction of P and G) (PDF/X)
272 * @POPPLER_PDF_SUBTYPE_CONF_U: Level U (Unicode) conformance (PDF/A)
273 * @POPPLER_PDF_SUBTYPE_CONF_NONE: No conformance level available
274 *
275 * PDF Subtype Conformance
276 *
277 * Since: 0.70
278 */
279typedef enum
280{
281 POPPLER_PDF_SUBTYPE_CONF_UNSET,
282 POPPLER_PDF_SUBTYPE_CONF_A,
283 POPPLER_PDF_SUBTYPE_CONF_B,
284 POPPLER_PDF_SUBTYPE_CONF_G,
285 POPPLER_PDF_SUBTYPE_CONF_N,
286 POPPLER_PDF_SUBTYPE_CONF_P,
287 POPPLER_PDF_SUBTYPE_CONF_PG,
288 POPPLER_PDF_SUBTYPE_CONF_U,
289 POPPLER_PDF_SUBTYPE_CONF_NONE
290} PopplerPDFConformance;
291
292POPPLER_PUBLIC
293GType poppler_document_get_type(void) G_GNUC_CONST;
294
295POPPLER_PUBLIC
296PopplerDocument *poppler_document_new_from_file(const char *uri, const char *password, GError **error);
297POPPLER_PUBLIC
298PopplerDocument *poppler_document_new_from_data(char *data, int length, const char *password, GError **error) G_GNUC_DEPRECATED_FOR(poppler_document_new_from_bytes);
299POPPLER_PUBLIC
300PopplerDocument *poppler_document_new_from_bytes(GBytes *bytes, const char *password, GError **error);
301POPPLER_PUBLIC
302PopplerDocument *poppler_document_new_from_stream(GInputStream *stream, goffset length, const char *password, GCancellable *cancellable, GError **error);
303POPPLER_PUBLIC
304PopplerDocument *poppler_document_new_from_gfile(GFile *file, const char *password, GCancellable *cancellable, GError **error);
305#ifndef G_OS_WIN32
306POPPLER_PUBLIC
307PopplerDocument *poppler_document_new_from_fd(int fd, const char *password, GError **error);
308#endif
309POPPLER_PUBLIC
310gboolean poppler_document_save(PopplerDocument *document, const char *uri, GError **error);
311POPPLER_PUBLIC
312gboolean poppler_document_save_a_copy(PopplerDocument *document, const char *uri, GError **error);
313#ifndef G_OS_WIN32
314POPPLER_PUBLIC
315gboolean poppler_document_save_to_fd(PopplerDocument *document, int fd, gboolean include_changes, GError **error);
316#endif
317POPPLER_PUBLIC
318gboolean poppler_document_get_id(PopplerDocument *document, gchar **permanent_id, gchar **update_id);
319POPPLER_PUBLIC
320int poppler_document_get_n_pages(PopplerDocument *document);
321POPPLER_PUBLIC
322PopplerPage *poppler_document_get_page(PopplerDocument *document, int index);
323POPPLER_PUBLIC
324PopplerPage *poppler_document_get_page_by_label(PopplerDocument *document, const char *label);
325POPPLER_PUBLIC
326gchar *poppler_document_get_pdf_version_string(PopplerDocument *document);
327POPPLER_PUBLIC
328void poppler_document_get_pdf_version(PopplerDocument *document, guint *major_version, guint *minor_version);
329POPPLER_PUBLIC
330gchar *poppler_document_get_title(PopplerDocument *document);
331POPPLER_PUBLIC
332void poppler_document_set_title(PopplerDocument *document, const gchar *title);
333POPPLER_PUBLIC
334gchar *poppler_document_get_author(PopplerDocument *document);
335POPPLER_PUBLIC
336void poppler_document_set_author(PopplerDocument *document, const gchar *author);
337POPPLER_PUBLIC
338gchar *poppler_document_get_subject(PopplerDocument *document);
339POPPLER_PUBLIC
340void poppler_document_set_subject(PopplerDocument *document, const gchar *subject);
341POPPLER_PUBLIC
342gchar *poppler_document_get_keywords(PopplerDocument *document);
343POPPLER_PUBLIC
344void poppler_document_set_keywords(PopplerDocument *document, const gchar *keywords);
345POPPLER_PUBLIC
346gchar *poppler_document_get_creator(PopplerDocument *document);
347POPPLER_PUBLIC
348void poppler_document_set_creator(PopplerDocument *document, const gchar *creator);
349POPPLER_PUBLIC
350gchar *poppler_document_get_producer(PopplerDocument *document);
351POPPLER_PUBLIC
352void poppler_document_set_producer(PopplerDocument *document, const gchar *producer);
353POPPLER_PUBLIC
354time_t poppler_document_get_creation_date(PopplerDocument *document);
355POPPLER_PUBLIC
356void poppler_document_set_creation_date(PopplerDocument *document, time_t creation_date);
357POPPLER_PUBLIC
358GDateTime *poppler_document_get_creation_date_time(PopplerDocument *document);
359POPPLER_PUBLIC
360void poppler_document_set_creation_date_time(PopplerDocument *document, GDateTime *creation_datetime);
361POPPLER_PUBLIC
362time_t poppler_document_get_modification_date(PopplerDocument *document);
363POPPLER_PUBLIC
364void poppler_document_set_modification_date(PopplerDocument *document, time_t modification_date);
365POPPLER_PUBLIC
366GDateTime *poppler_document_get_modification_date_time(PopplerDocument *document);
367POPPLER_PUBLIC
368void poppler_document_set_modification_date_time(PopplerDocument *document, GDateTime *modification_datetime);
369POPPLER_PUBLIC
370gboolean poppler_document_is_linearized(PopplerDocument *document);
371POPPLER_PUBLIC
372PopplerPageLayout poppler_document_get_page_layout(PopplerDocument *document);
373POPPLER_PUBLIC
374PopplerPageMode poppler_document_get_page_mode(PopplerDocument *document);
375POPPLER_PUBLIC
376PopplerPermissions poppler_document_get_permissions(PopplerDocument *document);
377POPPLER_PUBLIC
378gchar *poppler_document_get_pdf_subtype_string(PopplerDocument *document);
379POPPLER_PUBLIC
380PopplerPDFSubtype poppler_document_get_pdf_subtype(PopplerDocument *document);
381POPPLER_PUBLIC
382PopplerPDFPart poppler_document_get_pdf_part(PopplerDocument *document);
383POPPLER_PUBLIC
384PopplerPDFConformance poppler_document_get_pdf_conformance(PopplerDocument *document);
385POPPLER_PUBLIC
386gchar *poppler_document_get_metadata(PopplerDocument *document);
387POPPLER_PUBLIC
388PopplerPrintScaling poppler_document_get_print_scaling(PopplerDocument *document);
389POPPLER_PUBLIC
390PopplerPrintDuplex poppler_document_get_print_duplex(PopplerDocument *document);
391POPPLER_PUBLIC
392gint poppler_document_get_print_n_copies(PopplerDocument *document);
393POPPLER_PUBLIC
394PopplerPageRange *poppler_document_get_print_page_ranges(PopplerDocument *document, int *n_ranges) G_GNUC_MALLOC;
395
396/* Attachments */
397POPPLER_PUBLIC
398guint poppler_document_get_n_attachments(PopplerDocument *document);
399POPPLER_PUBLIC
400gboolean poppler_document_has_attachments(PopplerDocument *document);
401POPPLER_PUBLIC
402GList *poppler_document_get_attachments(PopplerDocument *document);
403
404/* Links */
405POPPLER_PUBLIC
406PopplerDest *poppler_document_find_dest(PopplerDocument *document, const gchar *link_name);
407POPPLER_PUBLIC
408GTree *poppler_document_create_dests_tree(PopplerDocument *document);
409
410/* Form */
411POPPLER_PUBLIC
412PopplerFormField *poppler_document_get_form_field(PopplerDocument *document, gint id);
413
414POPPLER_PUBLIC
415void poppler_document_reset_form(PopplerDocument *document, GList *fields, gboolean exclude_fields);
416/* Javascript */
417POPPLER_PUBLIC
418gboolean poppler_document_has_javascript(PopplerDocument *document);
419
420/* Signatures */
421POPPLER_PUBLIC
422GList *poppler_document_get_signature_fields(PopplerDocument *document);
423POPPLER_PUBLIC
424gint poppler_document_get_n_signatures(const PopplerDocument *document);
425
426/* Interface for getting the Index of a poppler_document */
427#define POPPLER_TYPE_INDEX_ITER (poppler_index_iter_get_type())
428POPPLER_PUBLIC
429GType poppler_index_iter_get_type(void) G_GNUC_CONST;
430POPPLER_PUBLIC
431PopplerIndexIter *poppler_index_iter_new(PopplerDocument *document);
432POPPLER_PUBLIC
433PopplerIndexIter *poppler_index_iter_copy(PopplerIndexIter *iter);
434POPPLER_PUBLIC
435void poppler_index_iter_free(PopplerIndexIter *iter);
436
437POPPLER_PUBLIC
438PopplerIndexIter *poppler_index_iter_get_child(PopplerIndexIter *parent);
439POPPLER_PUBLIC
440gboolean poppler_index_iter_is_open(PopplerIndexIter *iter);
441POPPLER_PUBLIC
442PopplerAction *poppler_index_iter_get_action(PopplerIndexIter *iter);
443POPPLER_PUBLIC
444gboolean poppler_index_iter_next(PopplerIndexIter *iter);
445
446/* Interface for getting the Fonts of a poppler_document */
447#define POPPLER_TYPE_FONT_INFO (poppler_font_info_get_type())
448#define POPPLER_FONT_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), POPPLER_TYPE_FONT_INFO, PopplerFontInfo))
449#define POPPLER_IS_FONT_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), POPPLER_TYPE_FONT_INFO))
450POPPLER_PUBLIC
451GType poppler_font_info_get_type(void) G_GNUC_CONST;
452POPPLER_PUBLIC
453PopplerFontInfo *poppler_font_info_new(PopplerDocument *document);
454POPPLER_PUBLIC
455gboolean poppler_font_info_scan(PopplerFontInfo *font_info, int n_pages, PopplerFontsIter **iter);
456POPPLER_PUBLIC
457void poppler_font_info_free(PopplerFontInfo *font_info);
458
459#define POPPLER_TYPE_FONTS_ITER (poppler_fonts_iter_get_type())
460POPPLER_PUBLIC
461GType poppler_fonts_iter_get_type(void) G_GNUC_CONST;
462POPPLER_PUBLIC
463PopplerFontsIter *poppler_fonts_iter_copy(PopplerFontsIter *iter);
464POPPLER_PUBLIC
465void poppler_fonts_iter_free(PopplerFontsIter *iter);
466POPPLER_PUBLIC
467const char *poppler_fonts_iter_get_name(PopplerFontsIter *iter);
468POPPLER_PUBLIC
469const char *poppler_fonts_iter_get_full_name(PopplerFontsIter *iter);
470POPPLER_PUBLIC
471const char *poppler_fonts_iter_get_substitute_name(PopplerFontsIter *iter);
472POPPLER_PUBLIC
473const char *poppler_fonts_iter_get_file_name(PopplerFontsIter *iter);
474POPPLER_PUBLIC
475PopplerFontType poppler_fonts_iter_get_font_type(PopplerFontsIter *iter);
476POPPLER_PUBLIC
477const char *poppler_fonts_iter_get_encoding(PopplerFontsIter *iter);
478POPPLER_PUBLIC
479gboolean poppler_fonts_iter_is_embedded(PopplerFontsIter *iter);
480POPPLER_PUBLIC
481gboolean poppler_fonts_iter_is_subset(PopplerFontsIter *iter);
482POPPLER_PUBLIC
483gboolean poppler_fonts_iter_next(PopplerFontsIter *iter);
484
485/* Interface for getting the Layers of a poppler_document */
486#define POPPLER_TYPE_LAYERS_ITER (poppler_layers_iter_get_type())
487POPPLER_PUBLIC
488GType poppler_layers_iter_get_type(void) G_GNUC_CONST;
489POPPLER_PUBLIC
490PopplerLayersIter *poppler_layers_iter_new(PopplerDocument *document);
491POPPLER_PUBLIC
492PopplerLayersIter *poppler_layers_iter_copy(PopplerLayersIter *iter);
493POPPLER_PUBLIC
494void poppler_layers_iter_free(PopplerLayersIter *iter);
495
496POPPLER_PUBLIC
497PopplerLayersIter *poppler_layers_iter_get_child(PopplerLayersIter *parent);
498POPPLER_PUBLIC
499gchar *poppler_layers_iter_get_title(PopplerLayersIter *iter);
500POPPLER_PUBLIC
501PopplerLayer *poppler_layers_iter_get_layer(PopplerLayersIter *iter);
502POPPLER_PUBLIC
503gboolean poppler_layers_iter_next(PopplerLayersIter *iter);
504
505/* Export to ps */
506#define POPPLER_TYPE_PS_FILE (poppler_ps_file_get_type())
507#define POPPLER_PS_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), POPPLER_TYPE_PS_FILE, PopplerPSFile))
508#define POPPLER_IS_PS_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), POPPLER_TYPE_PS_FILE))
509POPPLER_PUBLIC
510GType poppler_ps_file_get_type(void) G_GNUC_CONST;
511POPPLER_PUBLIC
512PopplerPSFile *poppler_ps_file_new(PopplerDocument *document, const char *filename, int first_page, int n_pages);
513#ifndef G_OS_WIN32
514POPPLER_PUBLIC
515PopplerPSFile *poppler_ps_file_new_fd(PopplerDocument *document, int fd, int first_page, int n_pages);
516#endif
517POPPLER_PUBLIC
518void poppler_ps_file_set_paper_size(PopplerPSFile *ps_file, double width, double height);
519POPPLER_PUBLIC
520void poppler_ps_file_set_duplex(PopplerPSFile *ps_file, gboolean duplex);
521POPPLER_PUBLIC
522void poppler_ps_file_free(PopplerPSFile *ps_file);
523
524POPPLER_PUBLIC
525void poppler_document_sign(PopplerDocument *document, const PopplerSigningData *signing_data, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
526POPPLER_PUBLIC
527gboolean poppler_document_sign_finish(PopplerDocument *document, GAsyncResult *result, GError **error);
528
529/**
530 * PopplerPageRange:
531 * @start_page: first page in the range of pages
532 * @end_page: last page in the range of pages
533 *
534 * A #PopplerPageRange is used to specify a range of pages.
535 *
536 * Since: 0.80
537 */
538struct _PopplerPageRange
539{
540 gint start_page;
541 gint end_page;
542};
543
544G_END_DECLS
545
546#endif /* __POPPLER_DOCUMENT_H__ */
547

source code of poppler/glib/poppler-document.h