poppler 2.0.2-x86-mingw32 → 2.0.3-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) hide show
  1. checksums.yaml +7 -0
  2. data/README +1 -1
  3. data/Rakefile +69 -9
  4. data/ext/poppler/extconf.rb +5 -2
  5. data/ext/poppler/rbpoppler-action.c +242 -86
  6. data/ext/poppler/{rbpoppler-annotationcalloutline.c → rbpoppler-annotation-callout-line.c} +2 -3
  7. data/ext/poppler/{rbpoppler-annotationfreetext.c → rbpoppler-annotation-free-text.c} +2 -3
  8. data/ext/poppler/{rbpoppler-annotationmapping.c → rbpoppler-annotation-mapping.c} +2 -3
  9. data/ext/poppler/{rbpoppler-annotationmarkup.c → rbpoppler-annotation-markup.c} +5 -4
  10. data/ext/poppler/{rbpoppler-annotationtext.c → rbpoppler-annotation-text.c} +2 -7
  11. data/ext/poppler/{rbpoppler-buttonfield.c → rbpoppler-button-field.c} +0 -0
  12. data/ext/poppler/{rbpoppler-choicefield.c → rbpoppler-choice-field.c} +0 -0
  13. data/ext/poppler/{rbpoppler-fontinfo.c → rbpoppler-font-info.c} +2 -8
  14. data/ext/poppler/{rbpoppler-fontsiter.c → rbpoppler-fonts-iter.c} +5 -6
  15. data/ext/poppler/{rbpoppler-formfieldmapping.c → rbpoppler-form-field-mapping.c} +2 -3
  16. data/ext/poppler/{rbpoppler-imagemapping.c → rbpoppler-image-mapping.c} +2 -7
  17. data/ext/poppler/{rbpoppler-indexiter.c → rbpoppler-index-iter.c} +2 -3
  18. data/ext/poppler/{rbpoppler-linkmapping.c → rbpoppler-link-mapping.c} +2 -3
  19. data/ext/poppler/{rbpoppler-pagetransition.c → rbpoppler-page-transition.c} +2 -3
  20. data/ext/poppler/rbpoppler-page.c +0 -29
  21. data/ext/poppler/rbpoppler-private.h +13 -13
  22. data/ext/poppler/{rbpoppler-psfile.c → rbpoppler-ps-file.c} +2 -3
  23. data/ext/poppler/{rbpoppler-textfield.c → rbpoppler-text-field.c} +0 -0
  24. data/ext/poppler/rbpoppler.c +14 -22
  25. data/ext/poppler/rbpoppler.h +3 -6
  26. data/ext/poppler/rbpopplerconversions.h +1 -1
  27. data/lib/1.9/poppler.so +0 -0
  28. data/lib/2.0/poppler.so +0 -0
  29. data/sample/pdf2.rb +46 -10
  30. data/test/fixtures/image.png +0 -0
  31. data/test/run-test.rb +7 -4
  32. data/test/test_page.rb +1 -0
  33. data/vendor/local/bin/cjpeg.exe +0 -0
  34. data/vendor/local/bin/djpeg.exe +0 -0
  35. data/vendor/local/bin/jpegtran.exe +0 -0
  36. data/vendor/local/bin/libjpeg-9.dll +0 -0
  37. data/vendor/local/bin/libpoppler-44.dll +0 -0
  38. data/vendor/local/bin/libpoppler-glib-8.dll +0 -0
  39. data/vendor/local/bin/libsqlite3-0.dll +0 -0
  40. data/vendor/local/bin/pdfdetach.exe +0 -0
  41. data/vendor/local/bin/pdffonts.exe +0 -0
  42. data/vendor/local/bin/pdfimages.exe +0 -0
  43. data/vendor/local/bin/pdfinfo.exe +0 -0
  44. data/vendor/local/bin/pdfseparate.exe +0 -0
  45. data/vendor/local/bin/pdftocairo.exe +0 -0
  46. data/vendor/local/bin/pdftohtml.exe +0 -0
  47. data/vendor/local/bin/pdftoppm.exe +0 -0
  48. data/vendor/local/bin/pdftops.exe +0 -0
  49. data/vendor/local/bin/pdftotext.exe +0 -0
  50. data/vendor/local/bin/pdfunite.exe +0 -0
  51. data/vendor/local/bin/rdjpgcom.exe +0 -0
  52. data/vendor/local/bin/sqlite3.exe +0 -0
  53. data/vendor/local/bin/wrjpgcom.exe +0 -0
  54. data/vendor/local/include/jconfig.h +8 -0
  55. data/vendor/local/include/jerror.h +2 -2
  56. data/vendor/local/include/jmorecfg.h +28 -7
  57. data/vendor/local/include/jpeglib.h +46 -8
  58. data/vendor/local/include/poppler/glib/poppler-action.h +156 -2
  59. data/vendor/local/include/poppler/glib/poppler-annot.h +57 -1
  60. data/vendor/local/include/poppler/glib/poppler-attachment.h +17 -0
  61. data/vendor/local/include/poppler/glib/poppler-document.h +133 -26
  62. data/vendor/local/include/poppler/glib/poppler-enums.h +8 -0
  63. data/vendor/local/include/poppler/glib/poppler-features.h +58 -4
  64. data/vendor/local/include/poppler/glib/poppler-form-field.h +4 -0
  65. data/vendor/local/include/poppler/glib/poppler-media.h +73 -0
  66. data/vendor/local/include/poppler/glib/poppler-movie.h +42 -0
  67. data/vendor/local/include/poppler/glib/poppler-page.h +133 -44
  68. data/vendor/local/include/poppler/glib/poppler.h +125 -24
  69. data/vendor/local/include/sqlite3.h +7338 -0
  70. data/vendor/local/include/sqlite3ext.h +487 -0
  71. data/vendor/local/lib/girepository-1.0/Poppler-0.18.typelib +0 -0
  72. data/vendor/local/lib/libjpeg.a +0 -0
  73. data/vendor/local/lib/libjpeg.dll.a +0 -0
  74. data/vendor/local/lib/libjpeg.la +41 -0
  75. data/vendor/local/lib/libpoppler-glib.a +0 -0
  76. data/vendor/local/lib/libpoppler-glib.dll.a +0 -0
  77. data/vendor/local/lib/libpoppler-glib.la +41 -0
  78. data/vendor/local/lib/libpoppler.a +0 -0
  79. data/vendor/local/lib/libpoppler.dll.a +0 -0
  80. data/vendor/local/lib/libpoppler.la +41 -0
  81. data/vendor/local/lib/libsqlite3.a +0 -0
  82. data/vendor/local/lib/libsqlite3.dll.a +0 -0
  83. data/vendor/local/lib/libsqlite3.la +41 -0
  84. data/vendor/local/lib/pkgconfig/poppler-cairo.pc +9 -0
  85. data/vendor/local/lib/pkgconfig/poppler-glib.pc +3 -3
  86. data/vendor/local/lib/pkgconfig/poppler-splash.pc +2 -2
  87. data/vendor/local/lib/pkgconfig/poppler.pc +1 -1
  88. data/vendor/local/lib/pkgconfig/sqlite3.pc +13 -0
  89. data/vendor/local/share/gir-1.0/Poppler-0.18.gir +5452 -0
  90. data/vendor/local/share/gtk-doc/html/poppler/PopplerAnnot.html +1671 -0
  91. data/vendor/local/share/gtk-doc/html/poppler/PopplerAttachment.html +214 -0
  92. data/vendor/local/share/gtk-doc/html/poppler/PopplerDocument.html +2587 -0
  93. data/vendor/local/share/gtk-doc/html/poppler/PopplerFormField.html +1070 -0
  94. data/vendor/local/share/gtk-doc/html/poppler/PopplerLayer.html +228 -0
  95. data/vendor/local/share/gtk-doc/html/poppler/PopplerMedia.html +306 -0
  96. data/vendor/local/share/gtk-doc/html/poppler/PopplerMovie.html +156 -0
  97. data/vendor/local/share/gtk-doc/html/poppler/PopplerPage.html +2132 -0
  98. data/vendor/local/share/gtk-doc/html/poppler/annotation-glossary.html +71 -0
  99. data/vendor/local/share/gtk-doc/html/poppler/api-index-0-12.html +128 -0
  100. data/vendor/local/share/gtk-doc/html/poppler/api-index-0-14.html +107 -0
  101. data/vendor/local/share/gtk-doc/html/poppler/api-index-0-16.html +185 -0
  102. data/vendor/local/share/gtk-doc/html/poppler/api-index-0-18.html +77 -0
  103. data/vendor/local/share/gtk-doc/html/poppler/api-index-0-20.html +42 -0
  104. data/vendor/local/share/gtk-doc/html/poppler/api-index-0-22.html +62 -0
  105. data/vendor/local/share/gtk-doc/html/poppler/api-index-deprecated.html +42 -0
  106. data/vendor/local/share/gtk-doc/html/poppler/api-index-full.html +1352 -0
  107. data/vendor/local/share/gtk-doc/html/poppler/ch01.html +21 -19
  108. data/vendor/local/share/gtk-doc/html/poppler/home.png +0 -0
  109. data/vendor/local/share/gtk-doc/html/poppler/index.html +35 -18
  110. data/vendor/local/share/gtk-doc/html/poppler/index.sgml +548 -300
  111. data/vendor/local/share/gtk-doc/html/poppler/left.png +0 -0
  112. data/vendor/local/share/gtk-doc/html/poppler/poppler-PopplerAction.html +662 -0
  113. data/vendor/local/share/gtk-doc/html/poppler/poppler-Version-and-Features-Information.html +145 -0
  114. data/vendor/local/share/gtk-doc/html/poppler/poppler-poppler.html +319 -364
  115. data/vendor/local/share/gtk-doc/html/poppler/poppler.devhelp2 +506 -265
  116. data/vendor/local/share/gtk-doc/html/poppler/right.png +0 -0
  117. data/vendor/local/share/gtk-doc/html/poppler/style.css +153 -54
  118. data/vendor/local/share/gtk-doc/html/poppler/up.png +0 -0
  119. data/vendor/local/share/license/poppler/AUTHORS +5 -0
  120. data/vendor/local/share/license/poppler/COPYING +339 -0
  121. data/vendor/local/share/man/man1/cjpeg.1 +51 -10
  122. data/vendor/local/share/man/man1/djpeg.1 +5 -4
  123. data/vendor/local/share/man/man1/jpegtran.1 +15 -2
  124. data/vendor/local/share/man/man1/pdfdetach.1 +86 -0
  125. data/vendor/local/share/man/man1/pdffonts.1 +16 -7
  126. data/vendor/local/share/man/man1/pdfimages.1 +114 -7
  127. data/vendor/local/share/man/man1/pdfinfo.1 +16 -7
  128. data/vendor/local/share/man/man1/pdfseparate.1 +49 -0
  129. data/vendor/local/share/man/man1/pdftocairo.1 +266 -0
  130. data/vendor/local/share/man/man1/pdftohtml.1 +30 -8
  131. data/vendor/local/share/man/man1/pdftoppm.1 +42 -12
  132. data/vendor/local/share/man/man1/pdftops.1 +26 -10
  133. data/vendor/local/share/man/man1/pdftotext.1 +18 -7
  134. data/vendor/local/share/man/man1/pdfunite.1 +33 -0
  135. data/vendor/local/share/man/man1/sqlite3.1 +229 -0
  136. metadata +107 -64
  137. data/vendor/local/bin/libgcc_s_dw2-1.dll +0 -0
  138. data/vendor/local/bin/libjpeg-7.dll +0 -0
  139. data/vendor/local/bin/libpng12-0.dll +0 -0
  140. data/vendor/local/bin/libpoppler-5.dll +0 -0
  141. data/vendor/local/bin/libpoppler-glib-4.dll +0 -0
  142. data/vendor/local/include/libpng12/png.h +0 -3726
  143. data/vendor/local/include/libpng12/pngconf.h +0 -1508
  144. data/vendor/local/include/png.h +0 -3726
  145. data/vendor/local/include/pngconf.h +0 -1508
  146. data/vendor/local/lib/libpng.def +0 -366
  147. data/vendor/local/lib/libpng.lib +0 -0
  148. data/vendor/local/lib/libpng12.dll.a +0 -0
  149. data/vendor/local/lib/pkgconfig/libpng.pc +0 -11
  150. data/vendor/local/lib/pkgconfig/libpng12.pc +0 -11
  151. data/vendor/local/manifest/jpeg-dev_7-1_win32.mft +0 -18
  152. data/vendor/local/manifest/jpeg_7-1_win32.mft +0 -2
  153. data/vendor/local/manifest/libpng-dev_1.2.40-1_win32.mft +0 -15
  154. data/vendor/local/manifest/libpng_1.2.40-1_win32.mft +0 -2
  155. data/vendor/local/manifest/poppler-dev_0.12.0-1_win32.mft +0 -49
  156. data/vendor/local/manifest/poppler_0.12.0-1_win32.mft +0 -4
  157. data/vendor/local/share/gtk-doc/html/poppler/poppler-poppler-action.html +0 -386
  158. data/vendor/local/share/gtk-doc/html/poppler/poppler-poppler-annot.html +0 -854
  159. data/vendor/local/share/gtk-doc/html/poppler/poppler-poppler-attachment.html +0 -205
  160. data/vendor/local/share/gtk-doc/html/poppler/poppler-poppler-document.html +0 -1122
  161. data/vendor/local/share/gtk-doc/html/poppler/poppler-poppler-enums.html +0 -412
  162. data/vendor/local/share/gtk-doc/html/poppler/poppler-poppler-features.html +0 -143
  163. data/vendor/local/share/gtk-doc/html/poppler/poppler-poppler-form-field.html +0 -871
  164. data/vendor/local/share/gtk-doc/html/poppler/poppler-poppler-layer.html +0 -214
  165. data/vendor/local/share/gtk-doc/html/poppler/poppler-poppler-page.html +0 -1258
  166. data/vendor/local/share/gtk-doc/html/poppler/poppler.devhelp +0 -281
  167. data/vendor/local/share/man/man3/libpng.3 +0 -4349
  168. data/vendor/local/share/man/man3/libpngpf.3 +0 -790
  169. data/vendor/local/share/man/man5/png.5 +0 -74
  170. data/vendor/local/src/tml/packaging/jpeg_7-1_win32.log +0 -249
  171. data/vendor/local/src/tml/packaging/jpeg_7-1_win32.sh +0 -44
  172. data/vendor/local/src/tml/packaging/libpng_1.2.40-1_win32.log +0 -269
  173. data/vendor/local/src/tml/packaging/libpng_1.2.40-1_win32.sh +0 -63
@@ -24,6 +24,22 @@
24
24
 
25
25
  G_BEGIN_DECLS
26
26
 
27
+ /**
28
+ * PopplerActionType:
29
+ * @POPPLER_ACTION_UNKNOWN: unknown action
30
+ * @POPPLER_ACTION_NONE: no action specified
31
+ * @POPPLER_ACTION_GOTO_DEST: go to destination
32
+ * @POPPLER_ACTION_GOTO_REMOTE: go to destination in another document
33
+ * @POPPLER_ACTION_LAUNCH: launch app (or open document
34
+ * @POPPLER_ACTION_URI: URI
35
+ * @POPPLER_ACTION_NAMED: predefined action
36
+ * @POPPLER_ACTION_MOVIE: play movies. Since 0.14
37
+ * @POPPLER_ACTION_RENDITION: play multimedia content. Since 0.14
38
+ * @POPPLER_ACTION_OCG_STATE: state of layer. Since 0.14
39
+ * @POPPLER_ACTION_JAVASCRIPT: Javascript. Since 0.18
40
+ *
41
+ * Action types
42
+ */
27
43
  typedef enum
28
44
  {
29
45
  POPPLER_ACTION_UNKNOWN, /* unknown action */
@@ -33,9 +49,44 @@ typedef enum
33
49
  POPPLER_ACTION_LAUNCH, /* launch app (or open document) */
34
50
  POPPLER_ACTION_URI, /* URI */
35
51
  POPPLER_ACTION_NAMED, /* named action*/
36
- POPPLER_ACTION_MOVIE /* movie action */
52
+ POPPLER_ACTION_MOVIE, /* movie action */
53
+ POPPLER_ACTION_RENDITION, /* rendition action */
54
+ POPPLER_ACTION_OCG_STATE, /* Set-OCG-State action */
55
+ POPPLER_ACTION_JAVASCRIPT /* Javascript action */
37
56
  } PopplerActionType;
38
57
 
58
+ /**
59
+ * PopplerDestType:
60
+ * @POPPLER_DEST_UNKNOWN: unknown destination
61
+ * @POPPLER_DEST_XYZ: go to page with coordinates (left, top)
62
+ * positioned at the upper-left corner of the window and the contents of
63
+ * the page magnified by the factor zoom
64
+ * @POPPLER_DEST_FIT: go to page with its contents magnified just
65
+ * enough to fit the entire page within the window both horizontally and
66
+ * vertically
67
+ * @POPPLER_DEST_FITH: go to page with the vertical coordinate top
68
+ * positioned at the top edge of the window and the contents of the page
69
+ * magnified just enough to fit the entire width of the page within the window
70
+ * @POPPLER_DEST_FITV: go to page with the horizontal coordinate
71
+ * left positioned at the left edge of the window and the contents of the
72
+ * page magnified just enough to fit the entire height of the page within the window
73
+ * @POPPLER_DEST_FITR: go to page with its contents magnified just
74
+ * enough to fit the rectangle specified by the coordinates left, bottom,
75
+ * right, and top entirely within the window both horizontally and vertically
76
+ * @POPPLER_DEST_FITB: go to page with its contents magnified just enough to fit
77
+ * its bounding box entirely within the window both horizontally and vertically
78
+ * @POPPLER_DEST_FITBH: go to page with the vertical
79
+ * coordinate top positioned at the top edge of the window and the
80
+ * contents of the page magnified just enough to fit the entire width of its
81
+ * bounding box within the window
82
+ * @POPPLER_DEST_FITBV: go to page with the horizontal
83
+ * coordinate left positioned at the left edge of the window and the
84
+ * contents of the page magnified just enough to fit the entire height of its
85
+ * bounding box within the window
86
+ * @POPPLER_DEST_NAMED: got to page specified by a name. See poppler_document_find_dest()
87
+ *
88
+ * Destination types
89
+ */
39
90
  typedef enum
40
91
  {
41
92
  POPPLER_DEST_UNKNOWN,
@@ -50,6 +101,42 @@ typedef enum
50
101
  POPPLER_DEST_NAMED
51
102
  } PopplerDestType;
52
103
 
104
+ /**
105
+ * PopplerActionMovieOperation:
106
+ * @POPPLER_ACTION_MOVIE_PLAY: play movie
107
+ * @POPPLER_ACTION_MOVIE_PAUSE: pause playing movie
108
+ * @POPPLER_ACTION_MOVIE_RESUME: resume paused movie
109
+ * @POPPLER_ACTION_MOVIE_STOP: stop playing movie
110
+ *
111
+ * Movie operations
112
+ *
113
+ * Since: 0.14
114
+ */
115
+ typedef enum
116
+ {
117
+ POPPLER_ACTION_MOVIE_PLAY,
118
+ POPPLER_ACTION_MOVIE_PAUSE,
119
+ POPPLER_ACTION_MOVIE_RESUME,
120
+ POPPLER_ACTION_MOVIE_STOP
121
+ } PopplerActionMovieOperation;
122
+
123
+ /**
124
+ * PopplerActionLayerAction:
125
+ * @POPPLER_ACTION_LAYER_ON: set layer visibility on
126
+ * @POPPLER_ACTION_LAYER_OFF: set layer visibility off
127
+ * @POPPLER_ACTION_LAYER_TOGGLE: reverse the layer visibility state
128
+ *
129
+ * Layer actions
130
+ *
131
+ * Since: 0.14
132
+ */
133
+ typedef enum
134
+ {
135
+ POPPLER_ACTION_LAYER_ON,
136
+ POPPLER_ACTION_LAYER_OFF,
137
+ POPPLER_ACTION_LAYER_TOGGLE
138
+ } PopplerActionLayerAction;
139
+
53
140
  /* Define the PopplerAction types */
54
141
  typedef struct _PopplerActionAny PopplerActionAny;
55
142
  typedef struct _PopplerActionGotoDest PopplerActionGotoDest;
@@ -58,7 +145,26 @@ typedef struct _PopplerActionLaunch PopplerActionLaunch;
58
145
  typedef struct _PopplerActionUri PopplerActionUri;
59
146
  typedef struct _PopplerActionNamed PopplerActionNamed;
60
147
  typedef struct _PopplerActionMovie PopplerActionMovie;
148
+ typedef struct _PopplerActionRendition PopplerActionRendition;
149
+ typedef struct _PopplerActionOCGState PopplerActionOCGState;
150
+ typedef struct _PopplerActionJavascript PopplerActionJavascript;
61
151
 
152
+ /**
153
+ * PopplerDest:
154
+ * @type: type of destination
155
+ * @page_num: page number
156
+ * @left: left coordinate
157
+ * @bottom: bottom coordinate
158
+ * @right: right coordinate
159
+ * @top: top coordinate
160
+ * @zoom: scale factor
161
+ * @named_dest: name of the destination (#POPPLER_DEST_NAMED only)
162
+ * @change_left: whether left coordinate should be changed
163
+ * @change_top: whether top coordinate should be changed
164
+ * @change_zoom: whether scale factor should be changed
165
+ *
166
+ * Data structure for holding a destination
167
+ */
62
168
  struct _PopplerDest
63
169
  {
64
170
  PopplerDestType type;
@@ -75,6 +181,18 @@ struct _PopplerDest
75
181
  guint change_zoom : 1;
76
182
  };
77
183
 
184
+ /**
185
+ * PopplerActionLayer:
186
+ * @action: a #PopplerActionLayerAction
187
+ * @layers: list of #PopplerLayer<!-- -->s
188
+ *
189
+ * Action to perform over a list of layers
190
+ */
191
+ struct _PopplerActionLayer
192
+ {
193
+ PopplerActionLayerAction action;
194
+ GList *layers;
195
+ };
78
196
 
79
197
  struct _PopplerActionAny
80
198
  {
@@ -125,11 +243,44 @@ struct _PopplerActionNamed
125
243
  };
126
244
 
127
245
  struct _PopplerActionMovie
246
+ {
247
+ PopplerActionType type;
248
+ gchar *title;
249
+
250
+ PopplerActionMovieOperation operation;
251
+ PopplerMovie *movie;
252
+ };
253
+
254
+ struct _PopplerActionRendition
128
255
  {
129
256
  PopplerActionType type;
130
- gchar *title;
257
+ gchar *title;
258
+
259
+ gint op;
260
+ PopplerMedia *media;
131
261
  };
132
262
 
263
+ struct _PopplerActionOCGState
264
+ {
265
+ PopplerActionType type;
266
+ gchar *title;
267
+
268
+ GList *state_list;
269
+ };
270
+
271
+ struct _PopplerActionJavascript
272
+ {
273
+ PopplerActionType type;
274
+ gchar *title;
275
+
276
+ gchar *script;
277
+ };
278
+
279
+ /**
280
+ * PopplerAction:
281
+ *
282
+ * A data structure for holding actions
283
+ */
133
284
  union _PopplerAction
134
285
  {
135
286
  PopplerActionType type;
@@ -140,6 +291,9 @@ union _PopplerAction
140
291
  PopplerActionUri uri;
141
292
  PopplerActionNamed named;
142
293
  PopplerActionMovie movie;
294
+ PopplerActionRendition rendition;
295
+ PopplerActionOCGState ocg_state;
296
+ PopplerActionJavascript javascript;
143
297
  };
144
298
 
145
299
  #define POPPLER_TYPE_ACTION (poppler_action_get_type ())
@@ -42,8 +42,21 @@ G_BEGIN_DECLS
42
42
  #define POPPLER_ANNOT_FREE_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_ANNOT_FREE_TEXT, PopplerAnnotFreeText))
43
43
  #define POPPLER_IS_ANNOT_FREE_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_ANNOT_FREE_TEXT))
44
44
 
45
+ #define POPPLER_TYPE_ANNOT_FILE_ATTACHMENT (poppler_annot_file_attachment_get_type ())
46
+ #define POPPLER_ANNOT_FILE_ATTACHMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_ANNOT_MARKUP, PopplerAnnotFileAttachment))
47
+ #define POPPLER_IS_ANNOT_FILE_ATTACHMENT(obj)(G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_ANNOT_FILE_ATTACHMENT))
48
+
49
+ #define POPPLER_TYPE_ANNOT_MOVIE (poppler_annot_movie_get_type ())
50
+ #define POPPLER_ANNOT_MOVIE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_ANNOT_MOVIE, PopplerAnnotMovie))
51
+ #define POPPLER_IS_ANNOT_MOVIE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_ANNOT_MOVIE))
52
+
53
+ #define POPPLER_TYPE_ANNOT_SCREEN (poppler_annot_screen_get_type ())
54
+ #define POPPLER_ANNOT_SCREEN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_ANNOT_SCREEN, PopplerAnnotScreen))
55
+ #define POPPLER_IS_ANNOT_SCREEN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_ANNOT_SCREEN))
56
+
45
57
  #define POPPLER_TYPE_ANNOT_CALLOUT_LINE (poppler_annot_callout_line_get_type ())
46
58
 
59
+
47
60
  typedef enum
48
61
  {
49
62
  POPPLER_ANNOT_UNKNOWN,
@@ -101,6 +114,16 @@ typedef enum
101
114
  POPPLER_ANNOT_EXTERNAL_DATA_MARKUP_UNKNOWN
102
115
  } PopplerAnnotExternalDataType;
103
116
 
117
+ #define POPPLER_ANNOT_TEXT_ICON_NOTE "Note"
118
+ #define POPPLER_ANNOT_TEXT_ICON_COMMENT "Comment"
119
+ #define POPPLER_ANNOT_TEXT_ICON_KEY "Key"
120
+ #define POPPLER_ANNOT_TEXT_ICON_HELP "Help"
121
+ #define POPPLER_ANNOT_TEXT_ICON_NEW_PARAGRAPH "NewParagraph"
122
+ #define POPPLER_ANNOT_TEXT_ICON_PARAGRAPH "Paragraph"
123
+ #define POPPLER_ANNOT_TEXT_ICON_INSERT "Insert"
124
+ #define POPPLER_ANNOT_TEXT_ICON_CROSS "Cross"
125
+ #define POPPLER_ANNOT_TEXT_ICON_CIRCLE "Circle"
126
+
104
127
  typedef enum
105
128
  {
106
129
  POPPLER_ANNOT_TEXT_STATE_MARKED,
@@ -139,16 +162,29 @@ void poppler_annot_set_contents (
139
162
  gchar *poppler_annot_get_name (PopplerAnnot *poppler_annot);
140
163
  gchar *poppler_annot_get_modified (PopplerAnnot *poppler_annot);
141
164
  PopplerAnnotFlag poppler_annot_get_flags (PopplerAnnot *poppler_annot);
165
+ void poppler_annot_set_flags (PopplerAnnot *poppler_annot,
166
+ PopplerAnnotFlag flags);
142
167
  PopplerColor *poppler_annot_get_color (PopplerAnnot *poppler_annot);
168
+ void poppler_annot_set_color (PopplerAnnot *poppler_annot,
169
+ PopplerColor *poppler_color);
170
+ gint poppler_annot_get_page_index (PopplerAnnot *poppler_annot);
143
171
 
144
172
  /* PopplerAnnotMarkup */
145
173
  GType poppler_annot_markup_get_type (void) G_GNUC_CONST;
146
174
  gchar *poppler_annot_markup_get_label (PopplerAnnotMarkup *poppler_annot);
175
+ void poppler_annot_markup_set_label (PopplerAnnotMarkup *poppler_annot,
176
+ const gchar *label);
147
177
  gboolean poppler_annot_markup_has_popup (PopplerAnnotMarkup *poppler_annot);
178
+ void poppler_annot_markup_set_popup (PopplerAnnotMarkup *poppler_annot,
179
+ PopplerRectangle *popup_rect);
148
180
  gboolean poppler_annot_markup_get_popup_is_open (PopplerAnnotMarkup *poppler_annot);
181
+ void poppler_annot_markup_set_popup_is_open (PopplerAnnotMarkup *poppler_annot,
182
+ gboolean is_open);
149
183
  gboolean poppler_annot_markup_get_popup_rectangle (PopplerAnnotMarkup *poppler_annot,
150
184
  PopplerRectangle *poppler_rect);
151
185
  gdouble poppler_annot_markup_get_opacity (PopplerAnnotMarkup *poppler_annot);
186
+ void poppler_annot_markup_set_opacity (PopplerAnnotMarkup *poppler_annot,
187
+ gdouble opacity);
152
188
  GDate *poppler_annot_markup_get_date (PopplerAnnotMarkup *poppler_annot);
153
189
  gchar *poppler_annot_markup_get_subject (PopplerAnnotMarkup *poppler_annot);
154
190
  PopplerAnnotMarkupReplyType poppler_annot_markup_get_reply_to (PopplerAnnotMarkup *poppler_annot);
@@ -156,8 +192,14 @@ PopplerAnnotExternalDataType poppler_annot_markup_get_external_data (
156
192
 
157
193
  /* PopplerAnnotText */
158
194
  GType poppler_annot_text_get_type (void) G_GNUC_CONST;
195
+ PopplerAnnot *poppler_annot_text_new (PopplerDocument *doc,
196
+ PopplerRectangle *rect);
159
197
  gboolean poppler_annot_text_get_is_open (PopplerAnnotText *poppler_annot);
198
+ void poppler_annot_text_set_is_open (PopplerAnnotText *poppler_annot,
199
+ gboolean is_open);
160
200
  gchar *poppler_annot_text_get_icon (PopplerAnnotText *poppler_annot);
201
+ void poppler_annot_text_set_icon (PopplerAnnotText *poppler_annot,
202
+ const gchar *icon);
161
203
  PopplerAnnotTextState poppler_annot_text_get_state (PopplerAnnotText *poppler_annot);
162
204
 
163
205
  /* PopplerAnnotFreeText */
@@ -165,7 +207,21 @@ GType poppler_annot_free_text_get_type (
165
207
  PopplerAnnotFreeTextQuadding poppler_annot_free_text_get_quadding (PopplerAnnotFreeText *poppler_annot);
166
208
  PopplerAnnotCalloutLine *poppler_annot_free_text_get_callout_line (PopplerAnnotFreeText *poppler_annot);
167
209
 
168
- /* PopplerCalloutLine */
210
+ /* PopplerAnnotFileAttachment */
211
+ GType poppler_annot_file_attachment_get_type (void) G_GNUC_CONST;
212
+ PopplerAttachment *poppler_annot_file_attachment_get_attachment (PopplerAnnotFileAttachment *poppler_annot);
213
+ gchar *poppler_annot_file_attachment_get_name (PopplerAnnotFileAttachment *poppler_annot);
214
+
215
+ /* PopplerAnnotMovie */
216
+ GType poppler_annot_movie_get_type (void) G_GNUC_CONST;
217
+ gchar *poppler_annot_movie_get_title (PopplerAnnotMovie *poppler_annot);
218
+ PopplerMovie *poppler_annot_movie_get_movie (PopplerAnnotMovie *poppler_annot);
219
+
220
+ /* PopplerAnnotScreen */
221
+ GType poppler_annot_screen_get_type (void) G_GNUC_CONST;
222
+ PopplerAction *poppler_annot_screen_get_action (PopplerAnnotScreen *poppler_annot);
223
+
224
+ /* PopplerAnnotCalloutLine */
169
225
  GType poppler_annot_callout_line_get_type (void) G_GNUC_CONST;
170
226
  PopplerAnnotCalloutLine *poppler_annot_callout_line_new (void);
171
227
  PopplerAnnotCalloutLine *poppler_annot_callout_line_copy (PopplerAnnotCalloutLine *callout);
@@ -32,6 +32,23 @@ G_BEGIN_DECLS
32
32
  #define POPPLER_IS_ATTACHMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_ATTACHMENT))
33
33
 
34
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
+ */
35
52
  typedef gboolean (*PopplerAttachmentSaveFunc) (const gchar *buf,
36
53
  gsize count,
37
54
  gpointer data,
@@ -20,6 +20,7 @@
20
20
  #define __POPPLER_DOCUMENT_H__
21
21
 
22
22
  #include <glib-object.h>
23
+ #include <gio/gio.h>
23
24
  #include "poppler.h"
24
25
 
25
26
  G_BEGIN_DECLS
@@ -28,6 +29,18 @@ G_BEGIN_DECLS
28
29
  #define POPPLER_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_DOCUMENT, PopplerDocument))
29
30
  #define POPPLER_IS_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_DOCUMENT))
30
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
+ */
31
44
  typedef enum
32
45
  {
33
46
  POPPLER_PAGE_LAYOUT_UNSET,
@@ -39,6 +52,18 @@ typedef enum
39
52
  POPPLER_PAGE_LAYOUT_TWO_PAGE_RIGHT
40
53
  } PopplerPageLayout;
41
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
+ */
42
67
  typedef enum
43
68
  {
44
69
  POPPLER_PAGE_MODE_UNSET,
@@ -50,6 +75,23 @@ typedef enum
50
75
  POPPLER_PAGE_MODE_USE_ATTACHMENTS
51
76
  } PopplerPageMode;
52
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
+ */
53
95
  typedef enum
54
96
  {
55
97
  POPPLER_FONT_TYPE_UNKNOWN,
@@ -66,6 +108,19 @@ typedef enum
66
108
  POPPLER_FONT_TYPE_CID_TYPE2OT
67
109
  } PopplerFontType;
68
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
+ */
69
124
  typedef enum /*< flags >*/
70
125
  {
71
126
  POPPLER_VIEWER_PREFERENCES_UNSET = 0,
@@ -78,6 +133,22 @@ typedef enum /*< flags >*/
78
133
  POPPLER_VIEWER_PREFERENCES_DIRECTION_RTL = 1 << 6
79
134
  } PopplerViewerPreferences;
80
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
+ */
81
152
  typedef enum /*< flags >*/
82
153
  {
83
154
  POPPLER_PERMISSIONS_OK_TO_PRINT = 1 << 0,
@@ -85,42 +156,76 @@ typedef enum /*< flags >*/
85
156
  POPPLER_PERMISSIONS_OK_TO_COPY = 1 << 2,
86
157
  POPPLER_PERMISSIONS_OK_TO_ADD_NOTES = 1 << 3,
87
158
  POPPLER_PERMISSIONS_OK_TO_FILL_FORM = 1 << 4,
88
- 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)
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)
89
163
 
90
164
  } PopplerPermissions;
91
165
 
92
166
 
93
167
 
94
- GType poppler_document_get_type (void) G_GNUC_CONST;
95
- PopplerDocument *poppler_document_new_from_file (const char *uri,
96
- const char *password,
97
- GError **error);
98
- PopplerDocument *poppler_document_new_from_data (char *data,
99
- int length,
100
- const char *password,
101
- GError **error);
102
- gboolean poppler_document_save (PopplerDocument *document,
103
- const char *uri,
104
- GError **error);
105
- gboolean poppler_document_save_a_copy (PopplerDocument *document,
106
- const char *uri,
107
- GError **error);
108
- int poppler_document_get_n_pages (PopplerDocument *document);
109
- PopplerPage *poppler_document_get_page (PopplerDocument *document,
110
- int index);
111
- PopplerPage *poppler_document_get_page_by_label (PopplerDocument *document,
112
- const char *label);
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
+
113
217
  /* Attachments */
114
- gboolean poppler_document_has_attachments (PopplerDocument *document);
115
- GList *poppler_document_get_attachments (PopplerDocument *document);
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);
116
221
 
117
222
  /* Links */
118
- PopplerDest *poppler_document_find_dest (PopplerDocument *document,
119
- const gchar *link_name);
223
+ PopplerDest *poppler_document_find_dest (PopplerDocument *document,
224
+ const gchar *link_name);
120
225
 
121
226
  /* Form */
122
- PopplerFormField *poppler_document_get_form_field (PopplerDocument *document,
123
- gint id);
227
+ PopplerFormField *poppler_document_get_form_field (PopplerDocument *document,
228
+ gint id);
124
229
 
125
230
  /* Interface for getting the Index of a poppler_document */
126
231
  #define POPPLER_TYPE_INDEX_ITER (poppler_index_iter_get_type ())
@@ -151,8 +256,10 @@ PopplerFontsIter *poppler_fonts_iter_copy (PopplerFontsIter *iter);
151
256
  void poppler_fonts_iter_free (PopplerFontsIter *iter);
152
257
  const char *poppler_fonts_iter_get_name (PopplerFontsIter *iter);
153
258
  const char *poppler_fonts_iter_get_full_name (PopplerFontsIter *iter);
259
+ const char *poppler_fonts_iter_get_substitute_name (PopplerFontsIter *iter);
154
260
  const char *poppler_fonts_iter_get_file_name (PopplerFontsIter *iter);
155
261
  PopplerFontType poppler_fonts_iter_get_font_type (PopplerFontsIter *iter);
262
+ const char *poppler_fonts_iter_get_encoding (PopplerFontsIter *iter);
156
263
  gboolean poppler_fonts_iter_is_embedded (PopplerFontsIter *iter);
157
264
  gboolean poppler_fonts_iter_is_subset (PopplerFontsIter *iter);
158
265
  gboolean poppler_fonts_iter_next (PopplerFontsIter *iter);