poppler 2.2.4-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (185) hide show
  1. checksums.yaml +7 -0
  2. data/README +35 -0
  3. data/Rakefile +75 -0
  4. data/ext/poppler/depend +6 -0
  5. data/ext/poppler/extconf.rb +70 -0
  6. data/ext/poppler/poppler.def +2 -0
  7. data/ext/poppler/rbpoppler-action.c +372 -0
  8. data/ext/poppler/rbpoppler-annotation-callout-line.c +127 -0
  9. data/ext/poppler/rbpoppler-annotation-free-text.c +46 -0
  10. data/ext/poppler/rbpoppler-annotation-mapping.c +72 -0
  11. data/ext/poppler/rbpoppler-annotation-markup.c +98 -0
  12. data/ext/poppler/rbpoppler-annotation-text.c +53 -0
  13. data/ext/poppler/rbpoppler-annotation.c +74 -0
  14. data/ext/poppler/rbpoppler-attachment.c +124 -0
  15. data/ext/poppler/rbpoppler-button-field.c +56 -0
  16. data/ext/poppler/rbpoppler-choice-field.c +131 -0
  17. data/ext/poppler/rbpoppler-color.c +107 -0
  18. data/ext/poppler/rbpoppler-document.c +224 -0
  19. data/ext/poppler/rbpoppler-font-info.c +59 -0
  20. data/ext/poppler/rbpoppler-fonts-iter.c +127 -0
  21. data/ext/poppler/rbpoppler-form-field-mapping.c +44 -0
  22. data/ext/poppler/rbpoppler-form-field.c +98 -0
  23. data/ext/poppler/rbpoppler-image-mapping.c +48 -0
  24. data/ext/poppler/rbpoppler-index-iter.c +128 -0
  25. data/ext/poppler/rbpoppler-link-mapping.c +47 -0
  26. data/ext/poppler/rbpoppler-page-transition.c +59 -0
  27. data/ext/poppler/rbpoppler-page.c +322 -0
  28. data/ext/poppler/rbpoppler-private.h +77 -0
  29. data/ext/poppler/rbpoppler-ps-file.c +66 -0
  30. data/ext/poppler/rbpoppler-rectangle.c +92 -0
  31. data/ext/poppler/rbpoppler-text-field.c +91 -0
  32. data/ext/poppler/rbpoppler.c +111 -0
  33. data/ext/poppler/rbpoppler.h +61 -0
  34. data/ext/poppler/rbpopplerconversions.h +105 -0
  35. data/extconf.rb +49 -0
  36. data/lib/2.0/poppler.so +0 -0
  37. data/lib/2.1/poppler.so +0 -0
  38. data/lib/2.2/poppler.so +0 -0
  39. data/lib/poppler.rb +105 -0
  40. data/sample/number-pdf.rb +32 -0
  41. data/sample/pdf2.rb +132 -0
  42. data/sample/pdf2svg.rb +26 -0
  43. data/sample/pdf2text.rb +16 -0
  44. data/sample/pdfcrop.rb +32 -0
  45. data/sample/pdfdiv.rb +36 -0
  46. data/test/fixtures/image.pdf +0 -0
  47. data/test/fixtures/image.png +0 -0
  48. data/test/poppler-test-utils.rb +58 -0
  49. data/test/run-test.rb +32 -0
  50. data/test/test_annotation.rb +86 -0
  51. data/test/test_color.rb +26 -0
  52. data/test/test_constants.rb +30 -0
  53. data/test/test_document.rb +41 -0
  54. data/test/test_page.rb +42 -0
  55. data/vendor/local/bin/cjpeg.exe +0 -0
  56. data/vendor/local/bin/djpeg.exe +0 -0
  57. data/vendor/local/bin/jpegtran.exe +0 -0
  58. data/vendor/local/bin/libjpeg-9.dll +0 -0
  59. data/vendor/local/bin/libpoppler-48.dll +0 -0
  60. data/vendor/local/bin/libpoppler-cpp-0.dll +0 -0
  61. data/vendor/local/bin/libpoppler-glib-8.dll +0 -0
  62. data/vendor/local/bin/libsqlite3-0.dll +0 -0
  63. data/vendor/local/bin/pdfdetach.exe +0 -0
  64. data/vendor/local/bin/pdffonts.exe +0 -0
  65. data/vendor/local/bin/pdfimages.exe +0 -0
  66. data/vendor/local/bin/pdfinfo.exe +0 -0
  67. data/vendor/local/bin/pdfseparate.exe +0 -0
  68. data/vendor/local/bin/pdftocairo.exe +0 -0
  69. data/vendor/local/bin/pdftohtml.exe +0 -0
  70. data/vendor/local/bin/pdftoppm.exe +0 -0
  71. data/vendor/local/bin/pdftops.exe +0 -0
  72. data/vendor/local/bin/pdftotext.exe +0 -0
  73. data/vendor/local/bin/pdfunite.exe +0 -0
  74. data/vendor/local/bin/rdjpgcom.exe +0 -0
  75. data/vendor/local/bin/sqlite3.exe +0 -0
  76. data/vendor/local/bin/wrjpgcom.exe +0 -0
  77. data/vendor/local/include/jconfig.h +60 -0
  78. data/vendor/local/include/jerror.h +304 -0
  79. data/vendor/local/include/jmorecfg.h +446 -0
  80. data/vendor/local/include/jpeglib.h +1180 -0
  81. data/vendor/local/include/poppler/cpp/poppler-document.h +104 -0
  82. data/vendor/local/include/poppler/cpp/poppler-embedded-file.h +55 -0
  83. data/vendor/local/include/poppler/cpp/poppler-font.h +91 -0
  84. data/vendor/local/include/poppler/cpp/poppler-global.h +111 -0
  85. data/vendor/local/include/poppler/cpp/poppler-image.h +71 -0
  86. data/vendor/local/include/poppler/cpp/poppler-page-renderer.h +66 -0
  87. data/vendor/local/include/poppler/cpp/poppler-page-transition.h +82 -0
  88. data/vendor/local/include/poppler/cpp/poppler-page.h +76 -0
  89. data/vendor/local/include/poppler/cpp/poppler-rectangle.h +84 -0
  90. data/vendor/local/include/poppler/cpp/poppler-toc.h +74 -0
  91. data/vendor/local/include/poppler/cpp/poppler-version.h +39 -0
  92. data/vendor/local/include/poppler/glib/poppler-action.h +316 -0
  93. data/vendor/local/include/poppler/glib/poppler-annot.h +296 -0
  94. data/vendor/local/include/poppler/glib/poppler-attachment.h +87 -0
  95. data/vendor/local/include/poppler/glib/poppler-date.h +30 -0
  96. data/vendor/local/include/poppler/glib/poppler-document.h +299 -0
  97. data/vendor/local/include/poppler/glib/poppler-enums.h +116 -0
  98. data/vendor/local/include/poppler/glib/poppler-features.h +88 -0
  99. data/vendor/local/include/poppler/glib/poppler-form-field.h +111 -0
  100. data/vendor/local/include/poppler/glib/poppler-layer.h +43 -0
  101. data/vendor/local/include/poppler/glib/poppler-media.h +73 -0
  102. data/vendor/local/include/poppler/glib/poppler-movie.h +42 -0
  103. data/vendor/local/include/poppler/glib/poppler-page.h +377 -0
  104. data/vendor/local/include/poppler/glib/poppler-structure-element.h +357 -0
  105. data/vendor/local/include/poppler/glib/poppler.h +250 -0
  106. data/vendor/local/include/sqlite3.h +7494 -0
  107. data/vendor/local/include/sqlite3ext.h +487 -0
  108. data/vendor/local/lib/girepository-1.0/Poppler-0.18.typelib +0 -0
  109. data/vendor/local/lib/libjpeg.a +0 -0
  110. data/vendor/local/lib/libjpeg.dll.a +0 -0
  111. data/vendor/local/lib/libjpeg.la +41 -0
  112. data/vendor/local/lib/libpoppler-cpp.a +0 -0
  113. data/vendor/local/lib/libpoppler-cpp.dll.a +0 -0
  114. data/vendor/local/lib/libpoppler-cpp.la +41 -0
  115. data/vendor/local/lib/libpoppler-glib.a +0 -0
  116. data/vendor/local/lib/libpoppler-glib.dll.a +0 -0
  117. data/vendor/local/lib/libpoppler-glib.la +41 -0
  118. data/vendor/local/lib/libpoppler.a +0 -0
  119. data/vendor/local/lib/libpoppler.dll.a +0 -0
  120. data/vendor/local/lib/libpoppler.la +41 -0
  121. data/vendor/local/lib/libsqlite3.a +0 -0
  122. data/vendor/local/lib/libsqlite3.dll.a +0 -0
  123. data/vendor/local/lib/libsqlite3.la +41 -0
  124. data/vendor/local/lib/pkgconfig/poppler-cairo.pc +9 -0
  125. data/vendor/local/lib/pkgconfig/poppler-cpp.pc +13 -0
  126. data/vendor/local/lib/pkgconfig/poppler-glib.pc +13 -0
  127. data/vendor/local/lib/pkgconfig/poppler-splash.pc +9 -0
  128. data/vendor/local/lib/pkgconfig/poppler.pc +11 -0
  129. data/vendor/local/lib/pkgconfig/sqlite3.pc +13 -0
  130. data/vendor/local/share/gir-1.0/Poppler-0.18.gir +8281 -0
  131. data/vendor/local/share/gtk-doc/html/poppler/PopplerAnnot.html +3221 -0
  132. data/vendor/local/share/gtk-doc/html/poppler/PopplerAttachment.html +267 -0
  133. data/vendor/local/share/gtk-doc/html/poppler/PopplerDocument.html +3328 -0
  134. data/vendor/local/share/gtk-doc/html/poppler/PopplerFormField.html +1403 -0
  135. data/vendor/local/share/gtk-doc/html/poppler/PopplerLayer.html +307 -0
  136. data/vendor/local/share/gtk-doc/html/poppler/PopplerMedia.html +381 -0
  137. data/vendor/local/share/gtk-doc/html/poppler/PopplerMovie.html +197 -0
  138. data/vendor/local/share/gtk-doc/html/poppler/PopplerPage.html +3002 -0
  139. data/vendor/local/share/gtk-doc/html/poppler/PopplerStructureElement.html +3781 -0
  140. data/vendor/local/share/gtk-doc/html/poppler/annotation-glossary.html +63 -0
  141. data/vendor/local/share/gtk-doc/html/poppler/api-index-0-12.html +123 -0
  142. data/vendor/local/share/gtk-doc/html/poppler/api-index-0-14.html +102 -0
  143. data/vendor/local/share/gtk-doc/html/poppler/api-index-0-16.html +180 -0
  144. data/vendor/local/share/gtk-doc/html/poppler/api-index-0-18.html +72 -0
  145. data/vendor/local/share/gtk-doc/html/poppler/api-index-0-20.html +39 -0
  146. data/vendor/local/share/gtk-doc/html/poppler/api-index-0-22.html +64 -0
  147. data/vendor/local/share/gtk-doc/html/poppler/api-index-deprecated.html +39 -0
  148. data/vendor/local/share/gtk-doc/html/poppler/api-index-full.html +1830 -0
  149. data/vendor/local/share/gtk-doc/html/poppler/ch01.html +74 -0
  150. data/vendor/local/share/gtk-doc/html/poppler/home.png +0 -0
  151. data/vendor/local/share/gtk-doc/html/poppler/index.html +85 -0
  152. data/vendor/local/share/gtk-doc/html/poppler/index.sgml +557 -0
  153. data/vendor/local/share/gtk-doc/html/poppler/left-insensitive.png +0 -0
  154. data/vendor/local/share/gtk-doc/html/poppler/left.png +0 -0
  155. data/vendor/local/share/gtk-doc/html/poppler/poppler-PDF-Utility-functions.html +107 -0
  156. data/vendor/local/share/gtk-doc/html/poppler/poppler-PopplerAction.html +796 -0
  157. data/vendor/local/share/gtk-doc/html/poppler/poppler-PopplerColor.html +201 -0
  158. data/vendor/local/share/gtk-doc/html/poppler/poppler-Version-and-Features-Information.html +254 -0
  159. data/vendor/local/share/gtk-doc/html/poppler/poppler-poppler.html +169 -0
  160. data/vendor/local/share/gtk-doc/html/poppler/poppler.devhelp2 +470 -0
  161. data/vendor/local/share/gtk-doc/html/poppler/right-insensitive.png +0 -0
  162. data/vendor/local/share/gtk-doc/html/poppler/right.png +0 -0
  163. data/vendor/local/share/gtk-doc/html/poppler/style.css +476 -0
  164. data/vendor/local/share/gtk-doc/html/poppler/up-insensitive.png +0 -0
  165. data/vendor/local/share/gtk-doc/html/poppler/up.png +0 -0
  166. data/vendor/local/share/license/poppler/AUTHORS +5 -0
  167. data/vendor/local/share/license/poppler/COPYING +339 -0
  168. data/vendor/local/share/man/man1/cjpeg.1 +387 -0
  169. data/vendor/local/share/man/man1/djpeg.1 +252 -0
  170. data/vendor/local/share/man/man1/jpegtran.1 +293 -0
  171. data/vendor/local/share/man/man1/pdfdetach.1 +86 -0
  172. data/vendor/local/share/man/man1/pdffonts.1 +119 -0
  173. data/vendor/local/share/man/man1/pdfimages.1 +260 -0
  174. data/vendor/local/share/man/man1/pdfinfo.1 +152 -0
  175. data/vendor/local/share/man/man1/pdfseparate.1 +49 -0
  176. data/vendor/local/share/man/man1/pdftocairo.1 +295 -0
  177. data/vendor/local/share/man/man1/pdftohtml.1 +107 -0
  178. data/vendor/local/share/man/man1/pdftoppm.1 +170 -0
  179. data/vendor/local/share/man/man1/pdftops.1 +217 -0
  180. data/vendor/local/share/man/man1/pdftotext.1 +137 -0
  181. data/vendor/local/share/man/man1/pdfunite.1 +33 -0
  182. data/vendor/local/share/man/man1/rdjpgcom.1 +63 -0
  183. data/vendor/local/share/man/man1/sqlite3.1 +279 -0
  184. data/vendor/local/share/man/man1/wrjpgcom.1 +103 -0
  185. metadata +254 -0
@@ -0,0 +1,296 @@
1
+ /* poppler-annot.h: glib interface to poppler
2
+ *
3
+ * Copyright (C) 2007 Inigo Martinez <inigomartinez@gmail.com>
4
+ * Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
5
+ *
6
+ * This program is free software; you can redistribute it and/or modify
7
+ * it under the terms of the GNU General Public License as published by
8
+ * the Free Software Foundation; either version 2, or (at your option)
9
+ * any later version.
10
+ *
11
+ * This program 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 General Public License
17
+ * along with this program; if not, write to the Free Software
18
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
19
+ */
20
+
21
+ #ifndef __POPPLER_ANNOT_H__
22
+ #define __POPPLER_ANNOT_H__
23
+
24
+ #include <glib-object.h>
25
+ #include "poppler.h"
26
+
27
+ G_BEGIN_DECLS
28
+
29
+ #define POPPLER_TYPE_ANNOT (poppler_annot_get_type ())
30
+ #define POPPLER_ANNOT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_ANNOT, PopplerAnnot))
31
+ #define POPPLER_IS_ANNOT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_ANNOT))
32
+
33
+ #define POPPLER_TYPE_ANNOT_MARKUP (poppler_annot_markup_get_type ())
34
+ #define POPPLER_ANNOT_MARKUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_ANNOT_MARKUP, PopplerAnnotMarkup))
35
+ #define POPPLER_IS_ANNOT_MARKUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_ANNOT_MARKUP))
36
+
37
+ #define POPPLER_TYPE_ANNOT_TEXT (poppler_annot_text_get_type ())
38
+ #define POPPLER_ANNOT_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_ANNOT_TEXT, PopplerAnnotText))
39
+ #define POPPLER_IS_ANNOT_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_ANNOT_TEXT))
40
+
41
+ #define POPPLER_TYPE_ANNOT_TEXT_MARKUP (poppler_annot_text_markup_get_type ())
42
+ #define POPPLER_ANNOT_TEXT_MARKUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_ANNOT_TEXT_MARKUP, PopplerAnnotTextMarkup))
43
+ #define POPPLER_IS_ANNOT_TEXT_MARKUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_ANNOT_TEXT_MARKUP))
44
+
45
+
46
+ #define POPPLER_TYPE_ANNOT_FREE_TEXT (poppler_annot_free_text_get_type ())
47
+ #define POPPLER_ANNOT_FREE_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_ANNOT_FREE_TEXT, PopplerAnnotFreeText))
48
+ #define POPPLER_IS_ANNOT_FREE_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_ANNOT_FREE_TEXT))
49
+
50
+ #define POPPLER_TYPE_ANNOT_FILE_ATTACHMENT (poppler_annot_file_attachment_get_type ())
51
+ #define POPPLER_ANNOT_FILE_ATTACHMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_ANNOT_MARKUP, PopplerAnnotFileAttachment))
52
+ #define POPPLER_IS_ANNOT_FILE_ATTACHMENT(obj)(G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_ANNOT_FILE_ATTACHMENT))
53
+
54
+ #define POPPLER_TYPE_ANNOT_MOVIE (poppler_annot_movie_get_type ())
55
+ #define POPPLER_ANNOT_MOVIE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_ANNOT_MOVIE, PopplerAnnotMovie))
56
+ #define POPPLER_IS_ANNOT_MOVIE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_ANNOT_MOVIE))
57
+
58
+ #define POPPLER_TYPE_ANNOT_SCREEN (poppler_annot_screen_get_type ())
59
+ #define POPPLER_ANNOT_SCREEN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_ANNOT_SCREEN, PopplerAnnotScreen))
60
+ #define POPPLER_IS_ANNOT_SCREEN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_ANNOT_SCREEN))
61
+
62
+ #define POPPLER_TYPE_ANNOT_LINE (poppler_annot_line_get_type ())
63
+ #define POPPLER_ANNOT_LINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_ANNOT_LINE, PopplerAnnotLine))
64
+ #define POPPLER_IS_ANNOT_LINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_ANNOT_LINE))
65
+
66
+ #define POPPLER_TYPE_ANNOT_CALLOUT_LINE (poppler_annot_callout_line_get_type ())
67
+
68
+ #define POPPLER_TYPE_ANNOT_CIRCLE (poppler_annot_circle_get_type ())
69
+ #define POPPLER_ANNOT_CIRCLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_ANNOT_CIRCLE, PopplerAnnotCircle))
70
+ #define POPPLER_IS_ANNOT_CIRCLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_ANNOT_CIRCLE))
71
+
72
+ #define POPPLER_TYPE_ANNOT_SQUARE (poppler_annot_square_get_type ())
73
+ #define POPPLER_ANNOT_SQUARE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_ANNOT_SQUARE, PopplerAnnotSquare))
74
+ #define POPPLER_IS_ANNOT_SQUARE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_ANNOT_SQUARE))
75
+
76
+ typedef enum
77
+ {
78
+ POPPLER_ANNOT_UNKNOWN,
79
+ POPPLER_ANNOT_TEXT,
80
+ POPPLER_ANNOT_LINK,
81
+ POPPLER_ANNOT_FREE_TEXT,
82
+ POPPLER_ANNOT_LINE,
83
+ POPPLER_ANNOT_SQUARE,
84
+ POPPLER_ANNOT_CIRCLE,
85
+ POPPLER_ANNOT_POLYGON,
86
+ POPPLER_ANNOT_POLY_LINE,
87
+ POPPLER_ANNOT_HIGHLIGHT,
88
+ POPPLER_ANNOT_UNDERLINE,
89
+ POPPLER_ANNOT_SQUIGGLY,
90
+ POPPLER_ANNOT_STRIKE_OUT,
91
+ POPPLER_ANNOT_STAMP,
92
+ POPPLER_ANNOT_CARET,
93
+ POPPLER_ANNOT_INK,
94
+ POPPLER_ANNOT_POPUP,
95
+ POPPLER_ANNOT_FILE_ATTACHMENT,
96
+ POPPLER_ANNOT_SOUND,
97
+ POPPLER_ANNOT_MOVIE,
98
+ POPPLER_ANNOT_WIDGET,
99
+ POPPLER_ANNOT_SCREEN,
100
+ POPPLER_ANNOT_PRINTER_MARK,
101
+ POPPLER_ANNOT_TRAP_NET,
102
+ POPPLER_ANNOT_WATERMARK,
103
+ POPPLER_ANNOT_3D
104
+ } PopplerAnnotType;
105
+
106
+ typedef enum /*< flags >*/
107
+ {
108
+ POPPLER_ANNOT_FLAG_UNKNOWN = 0,
109
+ POPPLER_ANNOT_FLAG_INVISIBLE = 1 << 0,
110
+ POPPLER_ANNOT_FLAG_HIDDEN = 1 << 1,
111
+ POPPLER_ANNOT_FLAG_PRINT = 1 << 2,
112
+ POPPLER_ANNOT_FLAG_NO_ZOOM = 1 << 3,
113
+ POPPLER_ANNOT_FLAG_NO_ROTATE = 1 << 4,
114
+ POPPLER_ANNOT_FLAG_NO_VIEW = 1 << 5,
115
+ POPPLER_ANNOT_FLAG_READ_ONLY = 1 << 6,
116
+ POPPLER_ANNOT_FLAG_LOCKED = 1 << 7,
117
+ POPPLER_ANNOT_FLAG_TOGGLE_NO_VIEW = 1 << 8,
118
+ POPPLER_ANNOT_FLAG_LOCKED_CONTENTS = 1 << 9
119
+ } PopplerAnnotFlag;
120
+
121
+ typedef enum
122
+ {
123
+ POPPLER_ANNOT_MARKUP_REPLY_TYPE_R,
124
+ POPPLER_ANNOT_MARKUP_REPLY_TYPE_GROUP
125
+ } PopplerAnnotMarkupReplyType;
126
+
127
+ typedef enum
128
+ {
129
+ POPPLER_ANNOT_EXTERNAL_DATA_MARKUP_3D,
130
+ POPPLER_ANNOT_EXTERNAL_DATA_MARKUP_UNKNOWN
131
+ } PopplerAnnotExternalDataType;
132
+
133
+ #define POPPLER_ANNOT_TEXT_ICON_NOTE "Note"
134
+ #define POPPLER_ANNOT_TEXT_ICON_COMMENT "Comment"
135
+ #define POPPLER_ANNOT_TEXT_ICON_KEY "Key"
136
+ #define POPPLER_ANNOT_TEXT_ICON_HELP "Help"
137
+ #define POPPLER_ANNOT_TEXT_ICON_NEW_PARAGRAPH "NewParagraph"
138
+ #define POPPLER_ANNOT_TEXT_ICON_PARAGRAPH "Paragraph"
139
+ #define POPPLER_ANNOT_TEXT_ICON_INSERT "Insert"
140
+ #define POPPLER_ANNOT_TEXT_ICON_CROSS "Cross"
141
+ #define POPPLER_ANNOT_TEXT_ICON_CIRCLE "Circle"
142
+
143
+ typedef enum
144
+ {
145
+ POPPLER_ANNOT_TEXT_STATE_MARKED,
146
+ POPPLER_ANNOT_TEXT_STATE_UNMARKED,
147
+ POPPLER_ANNOT_TEXT_STATE_ACCEPTED,
148
+ POPPLER_ANNOT_TEXT_STATE_REJECTED,
149
+ POPPLER_ANNOT_TEXT_STATE_CANCELLED,
150
+ POPPLER_ANNOT_TEXT_STATE_COMPLETED,
151
+ POPPLER_ANNOT_TEXT_STATE_NONE,
152
+ POPPLER_ANNOT_TEXT_STATE_UNKNOWN
153
+ } PopplerAnnotTextState;
154
+
155
+ typedef enum
156
+ {
157
+ POPPLER_ANNOT_FREE_TEXT_QUADDING_LEFT_JUSTIFIED,
158
+ POPPLER_ANNOT_FREE_TEXT_QUADDING_CENTERED,
159
+ POPPLER_ANNOT_FREE_TEXT_QUADDING_RIGHT_JUSTIFIED
160
+ } PopplerAnnotFreeTextQuadding;
161
+
162
+ struct _PopplerAnnotCalloutLine
163
+ {
164
+ gboolean multiline;
165
+ gdouble x1;
166
+ gdouble y1;
167
+ gdouble x2;
168
+ gdouble y2;
169
+ gdouble x3;
170
+ gdouble y3;
171
+ };
172
+
173
+ GType poppler_annot_get_type (void) G_GNUC_CONST;
174
+ PopplerAnnotType poppler_annot_get_annot_type (PopplerAnnot *poppler_annot);
175
+ gchar *poppler_annot_get_contents (PopplerAnnot *poppler_annot);
176
+ void poppler_annot_set_contents (PopplerAnnot *poppler_annot,
177
+ const gchar *contents);
178
+ gchar *poppler_annot_get_name (PopplerAnnot *poppler_annot);
179
+ gchar *poppler_annot_get_modified (PopplerAnnot *poppler_annot);
180
+ PopplerAnnotFlag poppler_annot_get_flags (PopplerAnnot *poppler_annot);
181
+ void poppler_annot_set_flags (PopplerAnnot *poppler_annot,
182
+ PopplerAnnotFlag flags);
183
+ PopplerColor *poppler_annot_get_color (PopplerAnnot *poppler_annot);
184
+ void poppler_annot_set_color (PopplerAnnot *poppler_annot,
185
+ PopplerColor *poppler_color);
186
+ gint poppler_annot_get_page_index (PopplerAnnot *poppler_annot);
187
+ void poppler_annot_get_rectangle (PopplerAnnot *poppler_annot,
188
+ PopplerRectangle *poppler_rect);
189
+ void poppler_annot_set_rectangle (PopplerAnnot *poppler_annot,
190
+ PopplerRectangle *poppler_rect);
191
+
192
+ /* PopplerAnnotMarkup */
193
+ GType poppler_annot_markup_get_type (void) G_GNUC_CONST;
194
+ gchar *poppler_annot_markup_get_label (PopplerAnnotMarkup *poppler_annot);
195
+ void poppler_annot_markup_set_label (PopplerAnnotMarkup *poppler_annot,
196
+ const gchar *label);
197
+ gboolean poppler_annot_markup_has_popup (PopplerAnnotMarkup *poppler_annot);
198
+ void poppler_annot_markup_set_popup (PopplerAnnotMarkup *poppler_annot,
199
+ PopplerRectangle *popup_rect);
200
+ gboolean poppler_annot_markup_get_popup_is_open (PopplerAnnotMarkup *poppler_annot);
201
+ void poppler_annot_markup_set_popup_is_open (PopplerAnnotMarkup *poppler_annot,
202
+ gboolean is_open);
203
+ gboolean poppler_annot_markup_get_popup_rectangle (PopplerAnnotMarkup *poppler_annot,
204
+ PopplerRectangle *poppler_rect);
205
+ gdouble poppler_annot_markup_get_opacity (PopplerAnnotMarkup *poppler_annot);
206
+ void poppler_annot_markup_set_opacity (PopplerAnnotMarkup *poppler_annot,
207
+ gdouble opacity);
208
+ GDate *poppler_annot_markup_get_date (PopplerAnnotMarkup *poppler_annot);
209
+ gchar *poppler_annot_markup_get_subject (PopplerAnnotMarkup *poppler_annot);
210
+ PopplerAnnotMarkupReplyType poppler_annot_markup_get_reply_to (PopplerAnnotMarkup *poppler_annot);
211
+ PopplerAnnotExternalDataType poppler_annot_markup_get_external_data (PopplerAnnotMarkup *poppler_annot);
212
+
213
+ /* PopplerAnnotText */
214
+ GType poppler_annot_text_get_type (void) G_GNUC_CONST;
215
+ PopplerAnnot *poppler_annot_text_new (PopplerDocument *doc,
216
+ PopplerRectangle *rect);
217
+ gboolean poppler_annot_text_get_is_open (PopplerAnnotText *poppler_annot);
218
+ void poppler_annot_text_set_is_open (PopplerAnnotText *poppler_annot,
219
+ gboolean is_open);
220
+ gchar *poppler_annot_text_get_icon (PopplerAnnotText *poppler_annot);
221
+ void poppler_annot_text_set_icon (PopplerAnnotText *poppler_annot,
222
+ const gchar *icon);
223
+ PopplerAnnotTextState poppler_annot_text_get_state (PopplerAnnotText *poppler_annot);
224
+
225
+ /* PopplerAnnotTextMarkup */
226
+ GType poppler_annot_text_markup_get_type (void) G_GNUC_CONST;
227
+ PopplerAnnot *poppler_annot_text_markup_new_highlight (PopplerDocument *doc,
228
+ PopplerRectangle *rect,
229
+ GArray *quadrilaterals);
230
+ PopplerAnnot *poppler_annot_text_markup_new_squiggly (PopplerDocument *doc,
231
+ PopplerRectangle *rect,
232
+ GArray *quadrilaterals);
233
+ PopplerAnnot *poppler_annot_text_markup_new_strikeout (PopplerDocument *doc,
234
+ PopplerRectangle *rect,
235
+ GArray *quadrilaterals);
236
+ PopplerAnnot *poppler_annot_text_markup_new_underline (PopplerDocument *doc,
237
+ PopplerRectangle *rect,
238
+ GArray *quadrilaterals);
239
+ void poppler_annot_text_markup_set_quadrilaterals (PopplerAnnotTextMarkup *poppler_annot,
240
+ GArray *quadrilaterals);
241
+ GArray *poppler_annot_text_markup_get_quadrilaterals (PopplerAnnotTextMarkup *poppler_annot);
242
+
243
+ /* PopplerAnnotFreeText */
244
+ GType poppler_annot_free_text_get_type (void) G_GNUC_CONST;
245
+ PopplerAnnotFreeTextQuadding poppler_annot_free_text_get_quadding (PopplerAnnotFreeText *poppler_annot);
246
+ PopplerAnnotCalloutLine *poppler_annot_free_text_get_callout_line (PopplerAnnotFreeText *poppler_annot);
247
+
248
+ /* PopplerAnnotFileAttachment */
249
+ GType poppler_annot_file_attachment_get_type (void) G_GNUC_CONST;
250
+ PopplerAttachment *poppler_annot_file_attachment_get_attachment (PopplerAnnotFileAttachment *poppler_annot);
251
+ gchar *poppler_annot_file_attachment_get_name (PopplerAnnotFileAttachment *poppler_annot);
252
+
253
+ /* PopplerAnnotMovie */
254
+ GType poppler_annot_movie_get_type (void) G_GNUC_CONST;
255
+ gchar *poppler_annot_movie_get_title (PopplerAnnotMovie *poppler_annot);
256
+ PopplerMovie *poppler_annot_movie_get_movie (PopplerAnnotMovie *poppler_annot);
257
+
258
+ /* PopplerAnnotScreen */
259
+ GType poppler_annot_screen_get_type (void) G_GNUC_CONST;
260
+ PopplerAction *poppler_annot_screen_get_action (PopplerAnnotScreen *poppler_annot);
261
+
262
+ /* PopplerAnnotLine */
263
+ GType poppler_annot_line_get_type (void) G_GNUC_CONST;
264
+ PopplerAnnot *poppler_annot_line_new (PopplerDocument *doc,
265
+ PopplerRectangle *rect,
266
+ PopplerPoint *start,
267
+ PopplerPoint *end);
268
+ void poppler_annot_line_set_vertices (PopplerAnnotLine *poppler_annot,
269
+ PopplerPoint *start,
270
+ PopplerPoint *end);
271
+
272
+ /* PopplerAnnotCalloutLine */
273
+ GType poppler_annot_callout_line_get_type (void) G_GNUC_CONST;
274
+ PopplerAnnotCalloutLine *poppler_annot_callout_line_new (void);
275
+ PopplerAnnotCalloutLine *poppler_annot_callout_line_copy (PopplerAnnotCalloutLine *callout);
276
+ void poppler_annot_callout_line_free (PopplerAnnotCalloutLine *callout);
277
+
278
+ /* PopplerAnnotCircle */
279
+ GType poppler_annot_circle_get_type (void) G_GNUC_CONST;
280
+ PopplerAnnot *poppler_annot_circle_new (PopplerDocument *doc,
281
+ PopplerRectangle *rect);
282
+ void poppler_annot_circle_set_interior_color (PopplerAnnotCircle *poppler_annot,
283
+ PopplerColor *poppler_color);
284
+ PopplerColor *poppler_annot_circle_get_interior_color (PopplerAnnotCircle *poppler_annot);
285
+
286
+ /* PopplerAnnotGeometry */
287
+ GType poppler_annot_square_get_type (void) G_GNUC_CONST;
288
+ PopplerAnnot *poppler_annot_square_new (PopplerDocument *doc,
289
+ PopplerRectangle *rect);
290
+ void poppler_annot_square_set_interior_color (PopplerAnnotSquare *poppler_annot,
291
+ PopplerColor *poppler_color);
292
+ PopplerColor *poppler_annot_square_get_interior_color (PopplerAnnotSquare *poppler_annot);
293
+
294
+ G_END_DECLS
295
+
296
+ #endif /* __POPPLER_ANNOT_H__ */
@@ -0,0 +1,87 @@
1
+ /* poppler-attachment.h: glib interface to poppler
2
+ * Copyright (C) 2004, Red Hat, Inc.
3
+ *
4
+ * This program is free software; you can redistribute it and/or modify
5
+ * it under the terms of the GNU General Public License as published by
6
+ * the Free Software Foundation; either version 2, or (at your option)
7
+ * any later version.
8
+ *
9
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU General Public License
15
+ * along with this program; if not, write to the Free Software
16
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
17
+ */
18
+
19
+ #ifndef __POPPLER_ATTACHMENT_H__
20
+ #define __POPPLER_ATTACHMENT_H__
21
+
22
+ #include <glib.h>
23
+ #include <glib-object.h>
24
+
25
+ #include "poppler.h"
26
+
27
+ G_BEGIN_DECLS
28
+
29
+
30
+ #define POPPLER_TYPE_ATTACHMENT (poppler_attachment_get_type ())
31
+ #define POPPLER_ATTACHMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_ATTACHMENT, PopplerAttachment))
32
+ #define POPPLER_IS_ATTACHMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_ATTACHMENT))
33
+
34
+
35
+ /**
36
+ * PopplerAttachmentSaveFunc:
37
+ * @buf: (array length=count) (element-type guint8): buffer containing
38
+ * bytes to be written.
39
+ * @count: number of bytes in @buf.
40
+ * @data: (closure): user data passed to poppler_attachment_save_to_callback()
41
+ * @error: GError to set on error, or %NULL
42
+ *
43
+ * Specifies the type of the function passed to
44
+ * poppler_attachment_save_to_callback(). It is called once for each block of
45
+ * bytes that is "written" by poppler_attachment_save_to_callback(). If
46
+ * successful it should return %TRUE. If an error occurs it should set
47
+ * @error and return %FALSE, in which case poppler_attachment_save_to_callback()
48
+ * will fail with the same error.
49
+ *
50
+ * Returns: %TRUE if successful, %FALSE (with @error set) if failed.
51
+ */
52
+ typedef gboolean (*PopplerAttachmentSaveFunc) (const gchar *buf,
53
+ gsize count,
54
+ gpointer data,
55
+ GError **error);
56
+
57
+ struct _PopplerAttachment
58
+ {
59
+ GObject parent;
60
+
61
+ gchar *name;
62
+ gchar *description;
63
+ gsize size;
64
+ GTime mtime;
65
+ GTime ctime;
66
+ GString *checksum;
67
+ };
68
+
69
+ typedef struct _PopplerAttachmentClass
70
+ {
71
+ GObjectClass parent_class;
72
+ } PopplerAttachmentClass;
73
+
74
+
75
+ GType poppler_attachment_get_type (void) G_GNUC_CONST;
76
+ gboolean poppler_attachment_save (PopplerAttachment *attachment,
77
+ const char *filename,
78
+ GError **error);
79
+ gboolean poppler_attachment_save_to_callback (PopplerAttachment *attachment,
80
+ PopplerAttachmentSaveFunc save_func,
81
+ gpointer user_data,
82
+ GError **error);
83
+
84
+
85
+ G_END_DECLS
86
+
87
+ #endif /* __POPPLER_ATTACHMENT_H__ */
@@ -0,0 +1,30 @@
1
+ /* poppler-date.h: glib interface to poppler
2
+ *
3
+ * Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
4
+ *
5
+ * This program is free software; you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation; either version 2, or (at your option)
8
+ * any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program; if not, write to the Free Software
17
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
18
+ */
19
+
20
+ #ifndef __POPPLER_DATE_H__
21
+ #define __POPPLER_DATE_H__
22
+
23
+ #include "poppler.h"
24
+
25
+ G_BEGIN_DECLS
26
+ gboolean poppler_date_parse (const gchar *date,
27
+ time_t *timet);
28
+ G_END_DECLS
29
+
30
+ #endif /* __POPPLER_DATE_H__ */
@@ -0,0 +1,299 @@
1
+ /* poppler-document.h: glib interface to poppler
2
+ * Copyright (C) 2004, Red Hat, Inc.
3
+ *
4
+ * This program is free software; you can redistribute it and/or modify
5
+ * it under the terms of the GNU General Public License as published by
6
+ * the Free Software Foundation; either version 2, or (at your option)
7
+ * any later version.
8
+ *
9
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU General Public License
15
+ * along with this program; if not, write to the Free Software
16
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
17
+ */
18
+
19
+ #ifndef __POPPLER_DOCUMENT_H__
20
+ #define __POPPLER_DOCUMENT_H__
21
+
22
+ #include <glib-object.h>
23
+ #include <gio/gio.h>
24
+ #include "poppler.h"
25
+
26
+ G_BEGIN_DECLS
27
+
28
+ #define POPPLER_TYPE_DOCUMENT (poppler_document_get_type ())
29
+ #define POPPLER_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_DOCUMENT, PopplerDocument))
30
+ #define POPPLER_IS_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_DOCUMENT))
31
+
32
+ /**
33
+ * PopplerPageLayout:
34
+ * @POPPLER_PAGE_LAYOUT_UNSET: no specific layout set
35
+ * @POPPLER_PAGE_LAYOUT_SINGLE_PAGE: one page at a time
36
+ * @POPPLER_PAGE_LAYOUT_ONE_COLUMN: pages in one column
37
+ * @POPPLER_PAGE_LAYOUT_TWO_COLUMN_LEFT: pages in two columns with odd numbered pages on the left
38
+ * @POPPLER_PAGE_LAYOUT_TWO_COLUMN_RIGHT: pages in two columns with odd numbered pages on the right
39
+ * @POPPLER_PAGE_LAYOUT_TWO_PAGE_LEFT: two pages at a time with odd numbered pages on the left
40
+ * @POPPLER_PAGE_LAYOUT_TWO_PAGE_RIGHT: two pages at a time with odd numbered pages on the right
41
+ *
42
+ * Page layout types
43
+ */
44
+ typedef enum
45
+ {
46
+ POPPLER_PAGE_LAYOUT_UNSET,
47
+ POPPLER_PAGE_LAYOUT_SINGLE_PAGE,
48
+ POPPLER_PAGE_LAYOUT_ONE_COLUMN,
49
+ POPPLER_PAGE_LAYOUT_TWO_COLUMN_LEFT,
50
+ POPPLER_PAGE_LAYOUT_TWO_COLUMN_RIGHT,
51
+ POPPLER_PAGE_LAYOUT_TWO_PAGE_LEFT,
52
+ POPPLER_PAGE_LAYOUT_TWO_PAGE_RIGHT
53
+ } PopplerPageLayout;
54
+
55
+ /**
56
+ * PopplerPageMode:
57
+ * @POPPLER_PAGE_MODE_UNSET: no specific mode set
58
+ * @POPPLER_PAGE_MODE_NONE: neither document outline nor thumbnails visible
59
+ * @POPPLER_PAGE_MODE_USE_OUTLINES: document outline visible
60
+ * @POPPLER_PAGE_MODE_USE_THUMBS: thumbnails visible
61
+ * @POPPLER_PAGE_MODE_FULL_SCREEN: full-screen mode
62
+ * @POPPLER_PAGE_MODE_USE_OC: layers panel visible
63
+ * @POPPLER_PAGE_MODE_USE_ATTACHMENTS: attachments panel visible
64
+ *
65
+ * Page modes
66
+ */
67
+ typedef enum
68
+ {
69
+ POPPLER_PAGE_MODE_UNSET,
70
+ POPPLER_PAGE_MODE_NONE,
71
+ POPPLER_PAGE_MODE_USE_OUTLINES,
72
+ POPPLER_PAGE_MODE_USE_THUMBS,
73
+ POPPLER_PAGE_MODE_FULL_SCREEN,
74
+ POPPLER_PAGE_MODE_USE_OC,
75
+ POPPLER_PAGE_MODE_USE_ATTACHMENTS
76
+ } PopplerPageMode;
77
+
78
+ /**
79
+ * PopplerFontType:
80
+ * @POPPLER_FONT_TYPE_UNKNOWN: unknown font type
81
+ * @POPPLER_FONT_TYPE_TYPE1: Type 1 font type
82
+ * @POPPLER_FONT_TYPE_TYPE1C: Type 1 font type embedded in Compact Font Format (CFF) font program
83
+ * @POPPLER_FONT_TYPE_TYPE1COT: Type 1 font type embedded in OpenType font program
84
+ * @POPPLER_FONT_TYPE_TYPE3: A font type that is defined with PDF graphics operators
85
+ * @POPPLER_FONT_TYPE_TRUETYPE: TrueType font type
86
+ * @POPPLER_FONT_TYPE_TRUETYPEOT: TrueType font type embedded in OpenType font program
87
+ * @POPPLER_FONT_TYPE_CID_TYPE0: CIDFont type based on Type 1 font technology
88
+ * @POPPLER_FONT_TYPE_CID_TYPE0C: CIDFont type based on Type 1 font technology embedded in CFF font program
89
+ * @POPPLER_FONT_TYPE_CID_TYPE0COT: CIDFont type based on Type 1 font technology embedded in OpenType font program
90
+ * @POPPLER_FONT_TYPE_CID_TYPE2: CIDFont type based on TrueType font technology
91
+ * @POPPLER_FONT_TYPE_CID_TYPE2OT: CIDFont type based on TrueType font technology embedded in OpenType font program
92
+ *
93
+ * Font types
94
+ */
95
+ typedef enum
96
+ {
97
+ POPPLER_FONT_TYPE_UNKNOWN,
98
+ POPPLER_FONT_TYPE_TYPE1,
99
+ POPPLER_FONT_TYPE_TYPE1C,
100
+ POPPLER_FONT_TYPE_TYPE1COT,
101
+ POPPLER_FONT_TYPE_TYPE3,
102
+ POPPLER_FONT_TYPE_TRUETYPE,
103
+ POPPLER_FONT_TYPE_TRUETYPEOT,
104
+ POPPLER_FONT_TYPE_CID_TYPE0,
105
+ POPPLER_FONT_TYPE_CID_TYPE0C,
106
+ POPPLER_FONT_TYPE_CID_TYPE0COT,
107
+ POPPLER_FONT_TYPE_CID_TYPE2,
108
+ POPPLER_FONT_TYPE_CID_TYPE2OT
109
+ } PopplerFontType;
110
+
111
+ /**
112
+ * PopplerViewerPreferences:
113
+ * @POPPLER_VIEWER_PREFERENCES_UNSET: no preferences set
114
+ * @POPPLER_VIEWER_PREFERENCES_HIDE_TOOLBAR: hider toolbars when document is active
115
+ * @POPPLER_VIEWER_PREFERENCES_HIDE_MENUBAR: hide menu bar when document is active
116
+ * @POPPLER_VIEWER_PREFERENCES_HIDE_WINDOWUI: hide UI elements in document's window
117
+ * @POPPLER_VIEWER_PREFERENCES_FIT_WINDOW: resize document's window to fit the size of the first displayed page
118
+ * @POPPLER_VIEWER_PREFERENCES_CENTER_WINDOW: position the document's window in the center of the screen
119
+ * @POPPLER_VIEWER_PREFERENCES_DISPLAY_DOC_TITLE: display document title in window's title bar
120
+ * @POPPLER_VIEWER_PREFERENCES_DIRECTION_RTL: the predominant reading order for text is right to left
121
+ *
122
+ * Viewer preferences
123
+ */
124
+ typedef enum /*< flags >*/
125
+ {
126
+ POPPLER_VIEWER_PREFERENCES_UNSET = 0,
127
+ POPPLER_VIEWER_PREFERENCES_HIDE_TOOLBAR = 1 << 0,
128
+ POPPLER_VIEWER_PREFERENCES_HIDE_MENUBAR = 1 << 1,
129
+ POPPLER_VIEWER_PREFERENCES_HIDE_WINDOWUI = 1 << 2,
130
+ POPPLER_VIEWER_PREFERENCES_FIT_WINDOW = 1 << 3,
131
+ POPPLER_VIEWER_PREFERENCES_CENTER_WINDOW = 1 << 4,
132
+ POPPLER_VIEWER_PREFERENCES_DISPLAY_DOC_TITLE = 1 << 5,
133
+ POPPLER_VIEWER_PREFERENCES_DIRECTION_RTL = 1 << 6
134
+ } PopplerViewerPreferences;
135
+
136
+ /**
137
+ * PopplerPermissions:
138
+ * @POPPLER_PERMISSIONS_OK_TO_PRINT: document can be printer
139
+ * @POPPLER_PERMISSIONS_OK_TO_MODIFY: document contents can be modified
140
+ * @POPPLER_PERMISSIONS_OK_TO_COPY: document can be copied
141
+ * @POPPLER_PERMISSIONS_OK_TO_ADD_NOTES: annotations can added to the document
142
+ * @POPPLER_PERMISSIONS_OK_TO_FILL_FORM: interactive form fields can be filled in
143
+ * @POPPLER_PERMISSIONS_OK_TO_EXTRACT_CONTENTS: extract text and graphics
144
+ * (in support of accessibility to users with disabilities or for other purposes). Since 0.18
145
+ * @POPPLER_PERMISSIONS_OK_TO_ASSEMBLE: assemble the document (insert, rotate, or delete pages and create
146
+ * bookmarks or thumbnail images). Since 0.18
147
+ * @POPPLER_PERMISSIONS_OK_TO_PRINT_HIGH_RESOLUTION: document can be printer at high resolution. Since 0.18
148
+ * @POPPLER_PERMISSIONS_FULL: document permits all operations
149
+ *
150
+ * Permissions
151
+ */
152
+ typedef enum /*< flags >*/
153
+ {
154
+ POPPLER_PERMISSIONS_OK_TO_PRINT = 1 << 0,
155
+ POPPLER_PERMISSIONS_OK_TO_MODIFY = 1 << 1,
156
+ POPPLER_PERMISSIONS_OK_TO_COPY = 1 << 2,
157
+ POPPLER_PERMISSIONS_OK_TO_ADD_NOTES = 1 << 3,
158
+ POPPLER_PERMISSIONS_OK_TO_FILL_FORM = 1 << 4,
159
+ POPPLER_PERMISSIONS_OK_TO_EXTRACT_CONTENTS = 1 << 5,
160
+ POPPLER_PERMISSIONS_OK_TO_ASSEMBLE = 1 << 6,
161
+ POPPLER_PERMISSIONS_OK_TO_PRINT_HIGH_RESOLUTION = 1 << 7,
162
+ 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)
163
+
164
+ } PopplerPermissions;
165
+
166
+
167
+
168
+ GType poppler_document_get_type (void) G_GNUC_CONST;
169
+ PopplerDocument *poppler_document_new_from_file (const char *uri,
170
+ const char *password,
171
+ GError **error);
172
+ PopplerDocument *poppler_document_new_from_data (char *data,
173
+ int length,
174
+ const char *password,
175
+ GError **error);
176
+ PopplerDocument *poppler_document_new_from_stream (GInputStream *stream,
177
+ goffset length,
178
+ const char *password,
179
+ GCancellable *cancellable,
180
+ GError **error);
181
+ PopplerDocument *poppler_document_new_from_gfile (GFile *file,
182
+ const char *password,
183
+ GCancellable *cancellable,
184
+ GError **error);
185
+ gboolean poppler_document_save (PopplerDocument *document,
186
+ const char *uri,
187
+ GError **error);
188
+ gboolean poppler_document_save_a_copy (PopplerDocument *document,
189
+ const char *uri,
190
+ GError **error);
191
+ gboolean poppler_document_get_id (PopplerDocument *document,
192
+ gchar **permanent_id,
193
+ gchar **update_id);
194
+ int poppler_document_get_n_pages (PopplerDocument *document);
195
+ PopplerPage *poppler_document_get_page (PopplerDocument *document,
196
+ int index);
197
+ PopplerPage *poppler_document_get_page_by_label (PopplerDocument *document,
198
+ const char *label);
199
+ gchar *poppler_document_get_pdf_version_string (PopplerDocument *document);
200
+ void poppler_document_get_pdf_version (PopplerDocument *document,
201
+ guint *major_version,
202
+ guint *minor_version);
203
+ gchar *poppler_document_get_title (PopplerDocument *document);
204
+ gchar *poppler_document_get_author (PopplerDocument *document);
205
+ gchar *poppler_document_get_subject (PopplerDocument *document);
206
+ gchar *poppler_document_get_keywords (PopplerDocument *document);
207
+ gchar *poppler_document_get_creator (PopplerDocument *document);
208
+ gchar *poppler_document_get_producer (PopplerDocument *document);
209
+ time_t poppler_document_get_creation_date (PopplerDocument *document);
210
+ time_t poppler_document_get_modification_date (PopplerDocument *document);
211
+ gboolean poppler_document_is_linearized (PopplerDocument *document);
212
+ PopplerPageLayout poppler_document_get_page_layout (PopplerDocument *document);
213
+ PopplerPageMode poppler_document_get_page_mode (PopplerDocument *document);
214
+ PopplerPermissions poppler_document_get_permissions (PopplerDocument *document);
215
+ gchar *poppler_document_get_metadata (PopplerDocument *document);
216
+
217
+ /* Attachments */
218
+ guint poppler_document_get_n_attachments (PopplerDocument *document);
219
+ gboolean poppler_document_has_attachments (PopplerDocument *document);
220
+ GList *poppler_document_get_attachments (PopplerDocument *document);
221
+
222
+ /* Links */
223
+ PopplerDest *poppler_document_find_dest (PopplerDocument *document,
224
+ const gchar *link_name);
225
+
226
+ /* Form */
227
+ PopplerFormField *poppler_document_get_form_field (PopplerDocument *document,
228
+ gint id);
229
+
230
+ /* Interface for getting the Index of a poppler_document */
231
+ #define POPPLER_TYPE_INDEX_ITER (poppler_index_iter_get_type ())
232
+ GType poppler_index_iter_get_type (void) G_GNUC_CONST;
233
+ PopplerIndexIter *poppler_index_iter_new (PopplerDocument *document);
234
+ PopplerIndexIter *poppler_index_iter_copy (PopplerIndexIter *iter);
235
+ void poppler_index_iter_free (PopplerIndexIter *iter);
236
+
237
+ PopplerIndexIter *poppler_index_iter_get_child (PopplerIndexIter *parent);
238
+ gboolean poppler_index_iter_is_open (PopplerIndexIter *iter);
239
+ PopplerAction *poppler_index_iter_get_action (PopplerIndexIter *iter);
240
+ gboolean poppler_index_iter_next (PopplerIndexIter *iter);
241
+
242
+ /* Interface for getting the Fonts of a poppler_document */
243
+ #define POPPLER_TYPE_FONT_INFO (poppler_font_info_get_type ())
244
+ #define POPPLER_FONT_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_FONT_INFO, PopplerFontInfo))
245
+ #define POPPLER_IS_FONT_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_FONT_INFO))
246
+ GType poppler_font_info_get_type (void) G_GNUC_CONST;
247
+ PopplerFontInfo *poppler_font_info_new (PopplerDocument *document);
248
+ gboolean poppler_font_info_scan (PopplerFontInfo *font_info,
249
+ int n_pages,
250
+ PopplerFontsIter **iter);
251
+ void poppler_font_info_free (PopplerFontInfo *font_info);
252
+
253
+ #define POPPLER_TYPE_FONTS_ITER (poppler_fonts_iter_get_type ())
254
+ GType poppler_fonts_iter_get_type (void) G_GNUC_CONST;
255
+ PopplerFontsIter *poppler_fonts_iter_copy (PopplerFontsIter *iter);
256
+ void poppler_fonts_iter_free (PopplerFontsIter *iter);
257
+ const char *poppler_fonts_iter_get_name (PopplerFontsIter *iter);
258
+ const char *poppler_fonts_iter_get_full_name (PopplerFontsIter *iter);
259
+ const char *poppler_fonts_iter_get_substitute_name (PopplerFontsIter *iter);
260
+ const char *poppler_fonts_iter_get_file_name (PopplerFontsIter *iter);
261
+ PopplerFontType poppler_fonts_iter_get_font_type (PopplerFontsIter *iter);
262
+ const char *poppler_fonts_iter_get_encoding (PopplerFontsIter *iter);
263
+ gboolean poppler_fonts_iter_is_embedded (PopplerFontsIter *iter);
264
+ gboolean poppler_fonts_iter_is_subset (PopplerFontsIter *iter);
265
+ gboolean poppler_fonts_iter_next (PopplerFontsIter *iter);
266
+
267
+ /* Interface for getting the Layers of a poppler_document */
268
+ #define POPPLER_TYPE_LAYERS_ITER (poppler_layers_iter_get_type ())
269
+ GType poppler_layers_iter_get_type (void) G_GNUC_CONST;
270
+ PopplerLayersIter *poppler_layers_iter_new (PopplerDocument *document);
271
+ PopplerLayersIter *poppler_layers_iter_copy (PopplerLayersIter *iter);
272
+ void poppler_layers_iter_free (PopplerLayersIter *iter);
273
+
274
+ PopplerLayersIter *poppler_layers_iter_get_child (PopplerLayersIter *parent);
275
+ gchar *poppler_layers_iter_get_title (PopplerLayersIter *iter);
276
+ PopplerLayer *poppler_layers_iter_get_layer (PopplerLayersIter *iter);
277
+ gboolean poppler_layers_iter_next (PopplerLayersIter *iter);
278
+
279
+ /* Export to ps */
280
+ #define POPPLER_TYPE_PS_FILE (poppler_ps_file_get_type ())
281
+ #define POPPLER_PS_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_PS_FILE, PopplerPSFile))
282
+ #define POPPLER_IS_PS_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_PS_FILE))
283
+ GType poppler_ps_file_get_type (void) G_GNUC_CONST;
284
+ PopplerPSFile *poppler_ps_file_new (PopplerDocument *document,
285
+ const char *filename,
286
+ int first_page,
287
+ int n_pages);
288
+ void poppler_ps_file_set_paper_size (PopplerPSFile *ps_file,
289
+ double width,
290
+ double height);
291
+ void poppler_ps_file_set_duplex (PopplerPSFile *ps_file,
292
+ gboolean duplex);
293
+ void poppler_ps_file_free (PopplerPSFile *ps_file);
294
+
295
+
296
+
297
+ G_END_DECLS
298
+
299
+ #endif /* __POPPLER_DOCUMENT_H__ */