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,82 @@
1
+ /*
2
+ * Copyright (C) 2009, Pino Toscano <pino@kde.org>
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_PAGE_TRANSITION_H
20
+ #define POPPLER_PAGE_TRANSITION_H
21
+
22
+ #include "poppler-global.h"
23
+
24
+ class Object;
25
+
26
+ namespace poppler
27
+ {
28
+
29
+ class page;
30
+ class page_transition_private;
31
+
32
+ class POPPLER_CPP_EXPORT page_transition
33
+ {
34
+ public:
35
+ enum type_enum {
36
+ replace = 0,
37
+ split,
38
+ blinds,
39
+ box,
40
+ wipe,
41
+ dissolve,
42
+ glitter,
43
+ fly,
44
+ push,
45
+ cover,
46
+ uncover,
47
+ fade
48
+ };
49
+
50
+ enum alignment_enum {
51
+ horizontal = 0,
52
+ vertical
53
+ };
54
+
55
+ enum direction_enum {
56
+ inward = 0,
57
+ outward
58
+ };
59
+
60
+ page_transition(const page_transition &pt);
61
+ ~page_transition();
62
+
63
+ type_enum type() const;
64
+ int duration() const;
65
+ alignment_enum alignment() const;
66
+ direction_enum direction() const;
67
+ int angle() const;
68
+ double scale() const;
69
+ bool is_rectangular() const;
70
+
71
+ page_transition& operator=(const page_transition &pt);
72
+
73
+ private:
74
+ page_transition(Object *params);
75
+
76
+ page_transition_private *d;
77
+ friend class page;
78
+ };
79
+
80
+ }
81
+
82
+ #endif
@@ -0,0 +1,76 @@
1
+ /*
2
+ * Copyright (C) 2009-2010, Pino Toscano <pino@kde.org>
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_PAGE_H
20
+ #define POPPLER_PAGE_H
21
+
22
+ #include "poppler-global.h"
23
+ #include "poppler-rectangle.h"
24
+
25
+ namespace poppler
26
+ {
27
+
28
+ class document;
29
+ class document_private;
30
+ class page_private;
31
+ class page_transition;
32
+
33
+ class POPPLER_CPP_EXPORT page : public poppler::noncopyable
34
+ {
35
+ public:
36
+ enum orientation_enum {
37
+ landscape,
38
+ portrait,
39
+ seascape,
40
+ upside_down
41
+ };
42
+ enum search_direction_enum {
43
+ search_from_top,
44
+ search_next_result,
45
+ search_previous_result
46
+ };
47
+ enum text_layout_enum {
48
+ physical_layout,
49
+ raw_order_layout
50
+ };
51
+
52
+ ~page();
53
+
54
+ orientation_enum orientation() const;
55
+ double duration() const;
56
+ rectf page_rect(page_box_enum box = crop_box) const;
57
+ ustring label() const;
58
+
59
+ page_transition* transition() const;
60
+
61
+ bool search(const ustring &text, rectf &r, search_direction_enum direction,
62
+ case_sensitivity_enum case_sensitivity, rotation_enum rotation = rotate_0) const;
63
+ ustring text(const rectf &rect = rectf()) const;
64
+ ustring text(const rectf &rect, text_layout_enum layout_mode) const;
65
+
66
+ private:
67
+ page(document_private *doc, int index);
68
+
69
+ page_private *d;
70
+ friend class page_private;
71
+ friend class document;
72
+ };
73
+
74
+ }
75
+
76
+ #endif
@@ -0,0 +1,84 @@
1
+ /*
2
+ * Copyright (C) 2009-2010, Pino Toscano <pino@kde.org>
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_RECTANGLE_H
20
+ #define POPPLER_RECTANGLE_H
21
+
22
+ #include "poppler-global.h"
23
+
24
+ namespace poppler
25
+ {
26
+
27
+ template <typename T> class rectangle
28
+ {
29
+ public:
30
+ rectangle()
31
+ : x1(), y1(), x2(), y2()
32
+ {}
33
+ rectangle(T _x, T _y, T w, T h)
34
+ : x1(_x), y1(_y), x2(x1 + w), y2(y1 + h)
35
+ {}
36
+ ~rectangle()
37
+ {}
38
+
39
+ bool is_empty() const
40
+ { return (x1 == x2) && (y1 == y2); }
41
+
42
+ T x() const
43
+ { return x1; }
44
+
45
+ T y() const
46
+ { return y1; }
47
+
48
+ T width() const
49
+ { return x2 - x1; }
50
+
51
+ T height() const
52
+ { return y2 - y1; }
53
+
54
+ T left() const
55
+ { return x1; }
56
+ T top() const
57
+ { return y1; }
58
+ T right() const
59
+ { return x2; }
60
+ T bottom() const
61
+ { return y2; }
62
+
63
+ void set_left(T value)
64
+ { x1 = value; }
65
+ void set_top(T value)
66
+ { y1 = value; }
67
+ void set_right(T value)
68
+ { x2 = value; }
69
+ void set_bottom(T value)
70
+ { y2 = value; }
71
+
72
+ private:
73
+ T x1, y1, x2, y2;
74
+ };
75
+
76
+ typedef rectangle<int> rect;
77
+ typedef rectangle<double> rectf;
78
+
79
+ POPPLER_CPP_EXPORT std::ostream& operator<<(std::ostream& stream, const rect &r);
80
+ POPPLER_CPP_EXPORT std::ostream& operator<<(std::ostream& stream, const rectf &r);
81
+
82
+ }
83
+
84
+ #endif
@@ -0,0 +1,74 @@
1
+ /*
2
+ * Copyright (C) 2009, Pino Toscano <pino@kde.org>
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_TOC_H
20
+ #define POPPLER_TOC_H
21
+
22
+ #include "poppler-global.h"
23
+
24
+ #include <vector>
25
+
26
+ namespace poppler
27
+ {
28
+
29
+ class toc_private;
30
+ class toc_item;
31
+ class toc_item_private;
32
+
33
+ class POPPLER_CPP_EXPORT toc : public poppler::noncopyable
34
+ {
35
+ public:
36
+ ~toc();
37
+
38
+ toc_item* root() const;
39
+
40
+ private:
41
+ toc();
42
+
43
+ toc_private *d;
44
+
45
+ friend class toc_private;
46
+ };
47
+
48
+
49
+ class POPPLER_CPP_EXPORT toc_item : public poppler::noncopyable
50
+ {
51
+ public:
52
+ typedef std::vector<toc_item *>::const_iterator iterator;
53
+
54
+ ~toc_item();
55
+
56
+ ustring title() const;
57
+ bool is_open() const;
58
+
59
+ std::vector<toc_item *> children() const;
60
+ iterator children_begin() const;
61
+ iterator children_end() const;
62
+
63
+ private:
64
+ toc_item();
65
+
66
+ toc_item_private *d;
67
+ friend class toc;
68
+ friend class toc_private;
69
+ friend class toc_item_private;
70
+ };
71
+
72
+ }
73
+
74
+ #endif
@@ -0,0 +1,39 @@
1
+ /*
2
+ * Copyright (C) 2009, Pino Toscano <pino@kde.org>
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_VERSION_H
20
+ #define POPPLER_VERSION_H
21
+
22
+ #include "poppler-global.h"
23
+
24
+ #define POPPLER_VERSION "0.29.0"
25
+ #define POPPLER_VERSION_MAJOR 0
26
+ #define POPPLER_VERSION_MINOR 29
27
+ #define POPPLER_VERSION_MICRO 0
28
+
29
+ namespace poppler
30
+ {
31
+
32
+ POPPLER_CPP_EXPORT std::string version_string();
33
+ POPPLER_CPP_EXPORT unsigned int version_major();
34
+ POPPLER_CPP_EXPORT unsigned int version_minor();
35
+ POPPLER_CPP_EXPORT unsigned int version_micro();
36
+
37
+ }
38
+
39
+ #endif
@@ -0,0 +1,316 @@
1
+ /* poppler-action.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_ACTION_H__
20
+ #define __POPPLER_ACTION_H__
21
+
22
+ #include <glib-object.h>
23
+ #include "poppler.h"
24
+
25
+ G_BEGIN_DECLS
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
+ */
43
+ typedef enum
44
+ {
45
+ POPPLER_ACTION_UNKNOWN, /* unknown action */
46
+ POPPLER_ACTION_NONE, /* no action specified */
47
+ POPPLER_ACTION_GOTO_DEST, /* go to destination */
48
+ POPPLER_ACTION_GOTO_REMOTE, /* go to destination in new file */
49
+ POPPLER_ACTION_LAUNCH, /* launch app (or open document) */
50
+ POPPLER_ACTION_URI, /* URI */
51
+ POPPLER_ACTION_NAMED, /* named 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 */
56
+ } PopplerActionType;
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
+ */
90
+ typedef enum
91
+ {
92
+ POPPLER_DEST_UNKNOWN,
93
+ POPPLER_DEST_XYZ,
94
+ POPPLER_DEST_FIT,
95
+ POPPLER_DEST_FITH,
96
+ POPPLER_DEST_FITV,
97
+ POPPLER_DEST_FITR,
98
+ POPPLER_DEST_FITB,
99
+ POPPLER_DEST_FITBH,
100
+ POPPLER_DEST_FITBV,
101
+ POPPLER_DEST_NAMED
102
+ } PopplerDestType;
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
+
140
+ /* Define the PopplerAction types */
141
+ typedef struct _PopplerActionAny PopplerActionAny;
142
+ typedef struct _PopplerActionGotoDest PopplerActionGotoDest;
143
+ typedef struct _PopplerActionGotoRemote PopplerActionGotoRemote;
144
+ typedef struct _PopplerActionLaunch PopplerActionLaunch;
145
+ typedef struct _PopplerActionUri PopplerActionUri;
146
+ typedef struct _PopplerActionNamed PopplerActionNamed;
147
+ typedef struct _PopplerActionMovie PopplerActionMovie;
148
+ typedef struct _PopplerActionRendition PopplerActionRendition;
149
+ typedef struct _PopplerActionOCGState PopplerActionOCGState;
150
+ typedef struct _PopplerActionJavascript PopplerActionJavascript;
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
+ */
168
+ struct _PopplerDest
169
+ {
170
+ PopplerDestType type;
171
+
172
+ int page_num;
173
+ double left;
174
+ double bottom;
175
+ double right;
176
+ double top;
177
+ double zoom;
178
+ gchar *named_dest;
179
+ guint change_left : 1;
180
+ guint change_top : 1;
181
+ guint change_zoom : 1;
182
+ };
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
+ };
196
+
197
+ struct _PopplerActionAny
198
+ {
199
+ PopplerActionType type;
200
+ gchar *title;
201
+ };
202
+
203
+ struct _PopplerActionGotoDest
204
+ {
205
+ PopplerActionType type;
206
+ gchar *title;
207
+
208
+ PopplerDest *dest;
209
+ };
210
+
211
+ struct _PopplerActionGotoRemote
212
+ {
213
+ PopplerActionType type;
214
+ gchar *title;
215
+
216
+ gchar *file_name;
217
+ PopplerDest *dest;
218
+ };
219
+
220
+ struct _PopplerActionLaunch
221
+ {
222
+ PopplerActionType type;
223
+ gchar *title;
224
+
225
+ gchar *file_name;
226
+ gchar *params;
227
+ };
228
+
229
+ struct _PopplerActionUri
230
+ {
231
+ PopplerActionType type;
232
+ gchar *title;
233
+
234
+ char *uri;
235
+ };
236
+
237
+ struct _PopplerActionNamed
238
+ {
239
+ PopplerActionType type;
240
+ gchar *title;
241
+
242
+ gchar *named_dest;
243
+ };
244
+
245
+ struct _PopplerActionMovie
246
+ {
247
+ PopplerActionType type;
248
+ gchar *title;
249
+
250
+ PopplerActionMovieOperation operation;
251
+ PopplerMovie *movie;
252
+ };
253
+
254
+ struct _PopplerActionRendition
255
+ {
256
+ PopplerActionType type;
257
+ gchar *title;
258
+
259
+ gint op;
260
+ PopplerMedia *media;
261
+ };
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
+ */
284
+ union _PopplerAction
285
+ {
286
+ PopplerActionType type;
287
+ PopplerActionAny any;
288
+ PopplerActionGotoDest goto_dest;
289
+ PopplerActionGotoRemote goto_remote;
290
+ PopplerActionLaunch launch;
291
+ PopplerActionUri uri;
292
+ PopplerActionNamed named;
293
+ PopplerActionMovie movie;
294
+ PopplerActionRendition rendition;
295
+ PopplerActionOCGState ocg_state;
296
+ PopplerActionJavascript javascript;
297
+ };
298
+
299
+ #define POPPLER_TYPE_ACTION (poppler_action_get_type ())
300
+ #define POPPLER_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_ACTION, PopplerAction))
301
+
302
+ GType poppler_action_get_type (void) G_GNUC_CONST;
303
+
304
+ void poppler_action_free (PopplerAction *action);
305
+ PopplerAction *poppler_action_copy (PopplerAction *action);
306
+
307
+
308
+ #define POPPLER_TYPE_DEST (poppler_dest_get_type ())
309
+ GType poppler_dest_get_type (void) G_GNUC_CONST;
310
+
311
+ void poppler_dest_free (PopplerDest *dest);
312
+ PopplerDest *poppler_dest_copy (PopplerDest *dest);
313
+
314
+ G_END_DECLS
315
+
316
+ #endif /* __POPPLER_GLIB_H__ */