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.
- checksums.yaml +7 -0
- data/README +1 -1
- data/Rakefile +69 -9
- data/ext/poppler/extconf.rb +5 -2
- data/ext/poppler/rbpoppler-action.c +242 -86
- data/ext/poppler/{rbpoppler-annotationcalloutline.c → rbpoppler-annotation-callout-line.c} +2 -3
- data/ext/poppler/{rbpoppler-annotationfreetext.c → rbpoppler-annotation-free-text.c} +2 -3
- data/ext/poppler/{rbpoppler-annotationmapping.c → rbpoppler-annotation-mapping.c} +2 -3
- data/ext/poppler/{rbpoppler-annotationmarkup.c → rbpoppler-annotation-markup.c} +5 -4
- data/ext/poppler/{rbpoppler-annotationtext.c → rbpoppler-annotation-text.c} +2 -7
- data/ext/poppler/{rbpoppler-buttonfield.c → rbpoppler-button-field.c} +0 -0
- data/ext/poppler/{rbpoppler-choicefield.c → rbpoppler-choice-field.c} +0 -0
- data/ext/poppler/{rbpoppler-fontinfo.c → rbpoppler-font-info.c} +2 -8
- data/ext/poppler/{rbpoppler-fontsiter.c → rbpoppler-fonts-iter.c} +5 -6
- data/ext/poppler/{rbpoppler-formfieldmapping.c → rbpoppler-form-field-mapping.c} +2 -3
- data/ext/poppler/{rbpoppler-imagemapping.c → rbpoppler-image-mapping.c} +2 -7
- data/ext/poppler/{rbpoppler-indexiter.c → rbpoppler-index-iter.c} +2 -3
- data/ext/poppler/{rbpoppler-linkmapping.c → rbpoppler-link-mapping.c} +2 -3
- data/ext/poppler/{rbpoppler-pagetransition.c → rbpoppler-page-transition.c} +2 -3
- data/ext/poppler/rbpoppler-page.c +0 -29
- data/ext/poppler/rbpoppler-private.h +13 -13
- data/ext/poppler/{rbpoppler-psfile.c → rbpoppler-ps-file.c} +2 -3
- data/ext/poppler/{rbpoppler-textfield.c → rbpoppler-text-field.c} +0 -0
- data/ext/poppler/rbpoppler.c +14 -22
- data/ext/poppler/rbpoppler.h +3 -6
- data/ext/poppler/rbpopplerconversions.h +1 -1
- data/lib/1.9/poppler.so +0 -0
- data/lib/2.0/poppler.so +0 -0
- data/sample/pdf2.rb +46 -10
- data/test/fixtures/image.png +0 -0
- data/test/run-test.rb +7 -4
- data/test/test_page.rb +1 -0
- data/vendor/local/bin/cjpeg.exe +0 -0
- data/vendor/local/bin/djpeg.exe +0 -0
- data/vendor/local/bin/jpegtran.exe +0 -0
- data/vendor/local/bin/libjpeg-9.dll +0 -0
- data/vendor/local/bin/libpoppler-44.dll +0 -0
- data/vendor/local/bin/libpoppler-glib-8.dll +0 -0
- data/vendor/local/bin/libsqlite3-0.dll +0 -0
- data/vendor/local/bin/pdfdetach.exe +0 -0
- data/vendor/local/bin/pdffonts.exe +0 -0
- data/vendor/local/bin/pdfimages.exe +0 -0
- data/vendor/local/bin/pdfinfo.exe +0 -0
- data/vendor/local/bin/pdfseparate.exe +0 -0
- data/vendor/local/bin/pdftocairo.exe +0 -0
- data/vendor/local/bin/pdftohtml.exe +0 -0
- data/vendor/local/bin/pdftoppm.exe +0 -0
- data/vendor/local/bin/pdftops.exe +0 -0
- data/vendor/local/bin/pdftotext.exe +0 -0
- data/vendor/local/bin/pdfunite.exe +0 -0
- data/vendor/local/bin/rdjpgcom.exe +0 -0
- data/vendor/local/bin/sqlite3.exe +0 -0
- data/vendor/local/bin/wrjpgcom.exe +0 -0
- data/vendor/local/include/jconfig.h +8 -0
- data/vendor/local/include/jerror.h +2 -2
- data/vendor/local/include/jmorecfg.h +28 -7
- data/vendor/local/include/jpeglib.h +46 -8
- data/vendor/local/include/poppler/glib/poppler-action.h +156 -2
- data/vendor/local/include/poppler/glib/poppler-annot.h +57 -1
- data/vendor/local/include/poppler/glib/poppler-attachment.h +17 -0
- data/vendor/local/include/poppler/glib/poppler-document.h +133 -26
- data/vendor/local/include/poppler/glib/poppler-enums.h +8 -0
- data/vendor/local/include/poppler/glib/poppler-features.h +58 -4
- data/vendor/local/include/poppler/glib/poppler-form-field.h +4 -0
- data/vendor/local/include/poppler/glib/poppler-media.h +73 -0
- data/vendor/local/include/poppler/glib/poppler-movie.h +42 -0
- data/vendor/local/include/poppler/glib/poppler-page.h +133 -44
- data/vendor/local/include/poppler/glib/poppler.h +125 -24
- data/vendor/local/include/sqlite3.h +7338 -0
- data/vendor/local/include/sqlite3ext.h +487 -0
- data/vendor/local/lib/girepository-1.0/Poppler-0.18.typelib +0 -0
- data/vendor/local/lib/libjpeg.a +0 -0
- data/vendor/local/lib/libjpeg.dll.a +0 -0
- data/vendor/local/lib/libjpeg.la +41 -0
- data/vendor/local/lib/libpoppler-glib.a +0 -0
- data/vendor/local/lib/libpoppler-glib.dll.a +0 -0
- data/vendor/local/lib/libpoppler-glib.la +41 -0
- data/vendor/local/lib/libpoppler.a +0 -0
- data/vendor/local/lib/libpoppler.dll.a +0 -0
- data/vendor/local/lib/libpoppler.la +41 -0
- data/vendor/local/lib/libsqlite3.a +0 -0
- data/vendor/local/lib/libsqlite3.dll.a +0 -0
- data/vendor/local/lib/libsqlite3.la +41 -0
- data/vendor/local/lib/pkgconfig/poppler-cairo.pc +9 -0
- data/vendor/local/lib/pkgconfig/poppler-glib.pc +3 -3
- data/vendor/local/lib/pkgconfig/poppler-splash.pc +2 -2
- data/vendor/local/lib/pkgconfig/poppler.pc +1 -1
- data/vendor/local/lib/pkgconfig/sqlite3.pc +13 -0
- data/vendor/local/share/gir-1.0/Poppler-0.18.gir +5452 -0
- data/vendor/local/share/gtk-doc/html/poppler/PopplerAnnot.html +1671 -0
- data/vendor/local/share/gtk-doc/html/poppler/PopplerAttachment.html +214 -0
- data/vendor/local/share/gtk-doc/html/poppler/PopplerDocument.html +2587 -0
- data/vendor/local/share/gtk-doc/html/poppler/PopplerFormField.html +1070 -0
- data/vendor/local/share/gtk-doc/html/poppler/PopplerLayer.html +228 -0
- data/vendor/local/share/gtk-doc/html/poppler/PopplerMedia.html +306 -0
- data/vendor/local/share/gtk-doc/html/poppler/PopplerMovie.html +156 -0
- data/vendor/local/share/gtk-doc/html/poppler/PopplerPage.html +2132 -0
- data/vendor/local/share/gtk-doc/html/poppler/annotation-glossary.html +71 -0
- data/vendor/local/share/gtk-doc/html/poppler/api-index-0-12.html +128 -0
- data/vendor/local/share/gtk-doc/html/poppler/api-index-0-14.html +107 -0
- data/vendor/local/share/gtk-doc/html/poppler/api-index-0-16.html +185 -0
- data/vendor/local/share/gtk-doc/html/poppler/api-index-0-18.html +77 -0
- data/vendor/local/share/gtk-doc/html/poppler/api-index-0-20.html +42 -0
- data/vendor/local/share/gtk-doc/html/poppler/api-index-0-22.html +62 -0
- data/vendor/local/share/gtk-doc/html/poppler/api-index-deprecated.html +42 -0
- data/vendor/local/share/gtk-doc/html/poppler/api-index-full.html +1352 -0
- data/vendor/local/share/gtk-doc/html/poppler/ch01.html +21 -19
- data/vendor/local/share/gtk-doc/html/poppler/home.png +0 -0
- data/vendor/local/share/gtk-doc/html/poppler/index.html +35 -18
- data/vendor/local/share/gtk-doc/html/poppler/index.sgml +548 -300
- data/vendor/local/share/gtk-doc/html/poppler/left.png +0 -0
- data/vendor/local/share/gtk-doc/html/poppler/poppler-PopplerAction.html +662 -0
- data/vendor/local/share/gtk-doc/html/poppler/poppler-Version-and-Features-Information.html +145 -0
- data/vendor/local/share/gtk-doc/html/poppler/poppler-poppler.html +319 -364
- data/vendor/local/share/gtk-doc/html/poppler/poppler.devhelp2 +506 -265
- data/vendor/local/share/gtk-doc/html/poppler/right.png +0 -0
- data/vendor/local/share/gtk-doc/html/poppler/style.css +153 -54
- data/vendor/local/share/gtk-doc/html/poppler/up.png +0 -0
- data/vendor/local/share/license/poppler/AUTHORS +5 -0
- data/vendor/local/share/license/poppler/COPYING +339 -0
- data/vendor/local/share/man/man1/cjpeg.1 +51 -10
- data/vendor/local/share/man/man1/djpeg.1 +5 -4
- data/vendor/local/share/man/man1/jpegtran.1 +15 -2
- data/vendor/local/share/man/man1/pdfdetach.1 +86 -0
- data/vendor/local/share/man/man1/pdffonts.1 +16 -7
- data/vendor/local/share/man/man1/pdfimages.1 +114 -7
- data/vendor/local/share/man/man1/pdfinfo.1 +16 -7
- data/vendor/local/share/man/man1/pdfseparate.1 +49 -0
- data/vendor/local/share/man/man1/pdftocairo.1 +266 -0
- data/vendor/local/share/man/man1/pdftohtml.1 +30 -8
- data/vendor/local/share/man/man1/pdftoppm.1 +42 -12
- data/vendor/local/share/man/man1/pdftops.1 +26 -10
- data/vendor/local/share/man/man1/pdftotext.1 +18 -7
- data/vendor/local/share/man/man1/pdfunite.1 +33 -0
- data/vendor/local/share/man/man1/sqlite3.1 +229 -0
- metadata +107 -64
- data/vendor/local/bin/libgcc_s_dw2-1.dll +0 -0
- data/vendor/local/bin/libjpeg-7.dll +0 -0
- data/vendor/local/bin/libpng12-0.dll +0 -0
- data/vendor/local/bin/libpoppler-5.dll +0 -0
- data/vendor/local/bin/libpoppler-glib-4.dll +0 -0
- data/vendor/local/include/libpng12/png.h +0 -3726
- data/vendor/local/include/libpng12/pngconf.h +0 -1508
- data/vendor/local/include/png.h +0 -3726
- data/vendor/local/include/pngconf.h +0 -1508
- data/vendor/local/lib/libpng.def +0 -366
- data/vendor/local/lib/libpng.lib +0 -0
- data/vendor/local/lib/libpng12.dll.a +0 -0
- data/vendor/local/lib/pkgconfig/libpng.pc +0 -11
- data/vendor/local/lib/pkgconfig/libpng12.pc +0 -11
- data/vendor/local/manifest/jpeg-dev_7-1_win32.mft +0 -18
- data/vendor/local/manifest/jpeg_7-1_win32.mft +0 -2
- data/vendor/local/manifest/libpng-dev_1.2.40-1_win32.mft +0 -15
- data/vendor/local/manifest/libpng_1.2.40-1_win32.mft +0 -2
- data/vendor/local/manifest/poppler-dev_0.12.0-1_win32.mft +0 -49
- data/vendor/local/manifest/poppler_0.12.0-1_win32.mft +0 -4
- data/vendor/local/share/gtk-doc/html/poppler/poppler-poppler-action.html +0 -386
- data/vendor/local/share/gtk-doc/html/poppler/poppler-poppler-annot.html +0 -854
- data/vendor/local/share/gtk-doc/html/poppler/poppler-poppler-attachment.html +0 -205
- data/vendor/local/share/gtk-doc/html/poppler/poppler-poppler-document.html +0 -1122
- data/vendor/local/share/gtk-doc/html/poppler/poppler-poppler-enums.html +0 -412
- data/vendor/local/share/gtk-doc/html/poppler/poppler-poppler-features.html +0 -143
- data/vendor/local/share/gtk-doc/html/poppler/poppler-poppler-form-field.html +0 -871
- data/vendor/local/share/gtk-doc/html/poppler/poppler-poppler-layer.html +0 -214
- data/vendor/local/share/gtk-doc/html/poppler/poppler-poppler-page.html +0 -1258
- data/vendor/local/share/gtk-doc/html/poppler/poppler.devhelp +0 -281
- data/vendor/local/share/man/man3/libpng.3 +0 -4349
- data/vendor/local/share/man/man3/libpngpf.3 +0 -790
- data/vendor/local/share/man/man5/png.5 +0 -74
- data/vendor/local/src/tml/packaging/jpeg_7-1_win32.log +0 -249
- data/vendor/local/src/tml/packaging/jpeg_7-1_win32.sh +0 -44
- data/vendor/local/src/tml/packaging/libpng_1.2.40-1_win32.log +0 -269
- data/vendor/local/src/tml/packaging/libpng_1.2.40-1_win32.sh +0 -63
@@ -14,6 +14,10 @@ GType poppler_action_type_get_type (void) G_GNUC_CONST;
|
|
14
14
|
#define POPPLER_TYPE_ACTION_TYPE (poppler_action_type_get_type ())
|
15
15
|
GType poppler_dest_type_get_type (void) G_GNUC_CONST;
|
16
16
|
#define POPPLER_TYPE_DEST_TYPE (poppler_dest_type_get_type ())
|
17
|
+
GType poppler_action_movie_operation_get_type (void) G_GNUC_CONST;
|
18
|
+
#define POPPLER_TYPE_ACTION_MOVIE_OPERATION (poppler_action_movie_operation_get_type ())
|
19
|
+
GType poppler_action_layer_action_get_type (void) G_GNUC_CONST;
|
20
|
+
#define POPPLER_TYPE_ACTION_LAYER_ACTION (poppler_action_layer_action_get_type ())
|
17
21
|
|
18
22
|
/* enumerations from "poppler-document.h" */
|
19
23
|
GType poppler_page_layout_get_type (void) G_GNUC_CONST;
|
@@ -64,6 +68,10 @@ GType poppler_page_transition_direction_get_type (void) G_GNUC_CONST;
|
|
64
68
|
#define POPPLER_TYPE_PAGE_TRANSITION_DIRECTION (poppler_page_transition_direction_get_type ())
|
65
69
|
GType poppler_selection_style_get_type (void) G_GNUC_CONST;
|
66
70
|
#define POPPLER_TYPE_SELECTION_STYLE (poppler_selection_style_get_type ())
|
71
|
+
GType poppler_print_flags_get_type (void) G_GNUC_CONST;
|
72
|
+
#define POPPLER_TYPE_PRINT_FLAGS (poppler_print_flags_get_type ())
|
73
|
+
GType poppler_find_flags_get_type (void) G_GNUC_CONST;
|
74
|
+
#define POPPLER_TYPE_FIND_FLAGS (poppler_find_flags_get_type ())
|
67
75
|
GType poppler_backend_get_type (void) G_GNUC_CONST;
|
68
76
|
#define POPPLER_TYPE_BACKEND (poppler_backend_get_type ())
|
69
77
|
G_END_DECLS
|
@@ -19,13 +19,67 @@
|
|
19
19
|
#ifndef __POPPLER_FEATURES_H__
|
20
20
|
#define __POPPLER_FEATURES_H__
|
21
21
|
|
22
|
-
|
23
|
-
|
22
|
+
/**
|
23
|
+
* SECTION:poppler-features
|
24
|
+
* @short_description: Variables and functions to check the poppler version and features
|
25
|
+
* @Title: Version and Features Information
|
26
|
+
*
|
27
|
+
* Poppler provides version information, and information about features
|
28
|
+
* enabled at compile time. This is primarily useful in configure checks
|
29
|
+
* for builds that have a configure script, or for allowing code to optionally
|
30
|
+
* depend but not require a specific poppler version.
|
31
|
+
*/
|
32
|
+
|
33
|
+
/**
|
34
|
+
* POPPLER_HAS_CAIRO:
|
35
|
+
*
|
36
|
+
* Defined if poppler was compiled with cairo support.
|
37
|
+
*/
|
38
|
+
#define POPPLER_HAS_CAIRO 1
|
24
39
|
|
40
|
+
/**
|
41
|
+
* POPPLER_MAJOR_VERSION:
|
42
|
+
*
|
43
|
+
* The major version number of the poppler header files (e.g. in poppler version
|
44
|
+
* 0.1.2 this is 0.)
|
45
|
+
*
|
46
|
+
* Since: 0.12
|
47
|
+
*/
|
25
48
|
#define POPPLER_MAJOR_VERSION (0)
|
26
|
-
#define POPPLER_MINOR_VERSION (12)
|
27
|
-
#define POPPLER_MICRO_VERSION (0)
|
28
49
|
|
50
|
+
/**
|
51
|
+
* POPPLER_MINOR_VERSION:
|
52
|
+
*
|
53
|
+
* The major version number of the poppler header files (e.g. in poppler version
|
54
|
+
* 0.1.2 this is 1.)
|
55
|
+
*
|
56
|
+
* Since: 0.12
|
57
|
+
*/
|
58
|
+
#define POPPLER_MINOR_VERSION (24)
|
59
|
+
|
60
|
+
/**
|
61
|
+
* POPPLER_MICRO_VERSION:
|
62
|
+
*
|
63
|
+
* The micro version number of the poppler header files (e.g. in poppler version
|
64
|
+
* 0.1.2 this is 2.)
|
65
|
+
*
|
66
|
+
* Since: 0.12
|
67
|
+
*/
|
68
|
+
#define POPPLER_MICRO_VERSION (4)
|
69
|
+
|
70
|
+
/**
|
71
|
+
* POPPLER_CHECK_VERSION:
|
72
|
+
* @major: major version (e.g. 0 for version 0.1.2)
|
73
|
+
* @minor: minor version (e.g. 1 for version 0.1.2)
|
74
|
+
* @micro: micro version (e.g. 2 for version 0.1.2)
|
75
|
+
*
|
76
|
+
* Checks the version fo the poppler library
|
77
|
+
*
|
78
|
+
* Returns: %TRUE if the version of the poppler header files is the same
|
79
|
+
* as or newer than the passed-in version
|
80
|
+
*
|
81
|
+
* Since: 0.12
|
82
|
+
*/
|
29
83
|
#define POPPLER_CHECK_VERSION(major,minor,micro) \
|
30
84
|
(POPPLER_MAJOR_VERSION > (major) || \
|
31
85
|
(POPPLER_MAJOR_VERSION == (major) && POPPLER_MINOR_VERSION > (minor)) || \
|
@@ -64,6 +64,10 @@ PopplerFormFieldType poppler_form_field_get_field_type (PopplerFormFie
|
|
64
64
|
gint poppler_form_field_get_id (PopplerFormField *field);
|
65
65
|
gdouble poppler_form_field_get_font_size (PopplerFormField *field);
|
66
66
|
gboolean poppler_form_field_is_read_only (PopplerFormField *field);
|
67
|
+
gchar *poppler_form_field_get_partial_name (PopplerFormField *field);
|
68
|
+
gchar *poppler_form_field_get_mapping_name (PopplerFormField *field);
|
69
|
+
gchar *poppler_form_field_get_name (PopplerFormField *field);
|
70
|
+
PopplerAction *poppler_form_field_get_action (PopplerFormField *field);
|
67
71
|
|
68
72
|
/* Button Field */
|
69
73
|
PopplerFormButtonType poppler_form_field_button_get_button_type (PopplerFormField *field);
|
@@ -0,0 +1,73 @@
|
|
1
|
+
/* poppler-media.h: glib interface to MediaRendition
|
2
|
+
*
|
3
|
+
* Copyright (C) 2010 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_MEDIA_H__
|
21
|
+
#define __POPPLER_MEDIA_H__
|
22
|
+
|
23
|
+
#include <glib-object.h>
|
24
|
+
#include "poppler.h"
|
25
|
+
|
26
|
+
G_BEGIN_DECLS
|
27
|
+
|
28
|
+
#define POPPLER_TYPE_MEDIA (poppler_media_get_type ())
|
29
|
+
#define POPPLER_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_MEDIA, PopplerMedia))
|
30
|
+
#define POPPLER_IS_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_MEDIA))
|
31
|
+
|
32
|
+
// FIXME: this should be generic (PopplerSaveToCallbackFunc)
|
33
|
+
|
34
|
+
/**
|
35
|
+
* PopplerMediaSaveFunc:
|
36
|
+
* @buf: (array length=count) (element-type guint8): buffer containing
|
37
|
+
* bytes to be written.
|
38
|
+
* @count: number of bytes in @buf.
|
39
|
+
* @data: (closure): user data passed to poppler_media_save_to_callback()
|
40
|
+
* @error: GError to set on error, or %NULL
|
41
|
+
*
|
42
|
+
* Specifies the type of the function passed to
|
43
|
+
* poppler_media_save_to_callback(). It is called once for each block of
|
44
|
+
* bytes that is "written" by poppler_media_save_to_callback(). If
|
45
|
+
* successful it should return %TRUE. If an error occurs it should set
|
46
|
+
* @error and return %FALSE, in which case poppler_media_save_to_callback()
|
47
|
+
* will fail with the same error.
|
48
|
+
*
|
49
|
+
* Returns: %TRUE if successful, %FALSE (with @error set) if failed.
|
50
|
+
*
|
51
|
+
* Since: 0.14
|
52
|
+
*/
|
53
|
+
typedef gboolean (*PopplerMediaSaveFunc) (const gchar *buf,
|
54
|
+
gsize count,
|
55
|
+
gpointer data,
|
56
|
+
GError **error);
|
57
|
+
|
58
|
+
GType poppler_media_get_type (void) G_GNUC_CONST;
|
59
|
+
gboolean poppler_media_is_embedded (PopplerMedia *poppler_media);
|
60
|
+
const gchar *poppler_media_get_filename (PopplerMedia *poppler_media);
|
61
|
+
const gchar *poppler_media_get_mime_type (PopplerMedia *poppler_media);
|
62
|
+
gboolean poppler_media_save (PopplerMedia *poppler_media,
|
63
|
+
const char *filename,
|
64
|
+
GError **error);
|
65
|
+
gboolean poppler_media_save_to_callback (PopplerMedia *poppler_media,
|
66
|
+
PopplerMediaSaveFunc save_func,
|
67
|
+
gpointer user_data,
|
68
|
+
GError **error);
|
69
|
+
|
70
|
+
G_END_DECLS
|
71
|
+
|
72
|
+
#endif /* __POPPLER_MEDIA_H__ */
|
73
|
+
|
@@ -0,0 +1,42 @@
|
|
1
|
+
/* poppler-movie.h: glib interface to Movie
|
2
|
+
*
|
3
|
+
* Copyright (C) 2010 Carlos Garcia Campos <carlosgc@gnome.org>
|
4
|
+
* Copyright (C) 2008 Hugo Mercier <hmercier31[@]gmail.com>
|
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_MOVIE_H__
|
22
|
+
#define __POPPLER_MOVIE_H__
|
23
|
+
|
24
|
+
#include <glib-object.h>
|
25
|
+
#include "poppler.h"
|
26
|
+
|
27
|
+
G_BEGIN_DECLS
|
28
|
+
|
29
|
+
#define POPPLER_TYPE_MOVIE (poppler_movie_get_type ())
|
30
|
+
#define POPPLER_MOVIE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_MOVIE, PopplerMovie))
|
31
|
+
#define POPPLER_IS_MOVIE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_MOVIE))
|
32
|
+
|
33
|
+
|
34
|
+
GType poppler_movie_get_type (void) G_GNUC_CONST;
|
35
|
+
const gchar *poppler_movie_get_filename (PopplerMovie *poppler_movie);
|
36
|
+
gboolean poppler_movie_need_poster (PopplerMovie *poppler_movie);
|
37
|
+
gboolean poppler_movie_show_controls (PopplerMovie *poppler_movie);
|
38
|
+
|
39
|
+
G_END_DECLS
|
40
|
+
|
41
|
+
#endif /* __POPPLER_MOVIE_H__ */
|
42
|
+
|
@@ -23,14 +23,7 @@
|
|
23
23
|
|
24
24
|
#include "poppler.h"
|
25
25
|
|
26
|
-
#ifdef POPPLER_WITH_GDK
|
27
|
-
#include <gdk/gdk.h>
|
28
|
-
#include <gdk-pixbuf/gdk-pixbuf.h>
|
29
|
-
#endif
|
30
|
-
|
31
|
-
#ifdef POPPLER_HAS_CAIRO
|
32
26
|
#include <cairo.h>
|
33
|
-
#endif
|
34
27
|
|
35
28
|
G_BEGIN_DECLS
|
36
29
|
|
@@ -41,41 +34,13 @@ G_BEGIN_DECLS
|
|
41
34
|
|
42
35
|
GType poppler_page_get_type (void) G_GNUC_CONST;
|
43
36
|
|
44
|
-
#ifdef POPPLER_WITH_GDK
|
45
|
-
void poppler_page_render_to_pixbuf (PopplerPage *page,
|
46
|
-
int src_x,
|
47
|
-
int src_y,
|
48
|
-
int src_width,
|
49
|
-
int src_height,
|
50
|
-
double scale,
|
51
|
-
int rotation,
|
52
|
-
GdkPixbuf *pixbuf);
|
53
|
-
void poppler_page_render_to_pixbuf_for_printing (PopplerPage *page,
|
54
|
-
int src_x,
|
55
|
-
int src_y,
|
56
|
-
int src_width,
|
57
|
-
int src_height,
|
58
|
-
double scale,
|
59
|
-
int rotation,
|
60
|
-
GdkPixbuf *pixbuf);
|
61
|
-
GdkPixbuf *poppler_page_get_thumbnail_pixbuf (PopplerPage *page);
|
62
|
-
void poppler_page_render_selection_to_pixbuf (
|
63
|
-
PopplerPage *page,
|
64
|
-
gdouble scale,
|
65
|
-
int rotation,
|
66
|
-
GdkPixbuf *pixbuf,
|
67
|
-
PopplerRectangle *selection,
|
68
|
-
PopplerRectangle *old_selection,
|
69
|
-
PopplerSelectionStyle style,
|
70
|
-
GdkColor *glyph_color,
|
71
|
-
GdkColor *background_color);
|
72
|
-
#endif /* POPPLER_WITH_GDK */
|
73
|
-
|
74
|
-
#ifdef POPPLER_HAS_CAIRO
|
75
37
|
void poppler_page_render (PopplerPage *page,
|
76
38
|
cairo_t *cairo);
|
77
39
|
void poppler_page_render_for_printing (PopplerPage *page,
|
78
40
|
cairo_t *cairo);
|
41
|
+
void poppler_page_render_for_printing_with_options (PopplerPage *page,
|
42
|
+
cairo_t *cairo,
|
43
|
+
PopplerPrintFlags options);
|
79
44
|
cairo_surface_t *poppler_page_get_thumbnail (PopplerPage *page);
|
80
45
|
void poppler_page_render_selection (PopplerPage *page,
|
81
46
|
cairo_t *cairo,
|
@@ -84,24 +49,32 @@ void poppler_page_render_selection (PopplerPage *pa
|
|
84
49
|
PopplerSelectionStyle style,
|
85
50
|
PopplerColor *glyph_color,
|
86
51
|
PopplerColor *background_color);
|
87
|
-
#endif /* POPPLER_HAS_CAIRO */
|
88
52
|
|
89
53
|
void poppler_page_get_size (PopplerPage *page,
|
90
54
|
double *width,
|
91
55
|
double *height);
|
92
56
|
int poppler_page_get_index (PopplerPage *page);
|
57
|
+
gchar *poppler_page_get_label (PopplerPage *page);
|
93
58
|
double poppler_page_get_duration (PopplerPage *page);
|
94
59
|
PopplerPageTransition *poppler_page_get_transition (PopplerPage *page);
|
95
60
|
gboolean poppler_page_get_thumbnail_size (PopplerPage *page,
|
96
61
|
int *width,
|
97
62
|
int *height);
|
63
|
+
GList *poppler_page_find_text_with_options (PopplerPage *page,
|
64
|
+
const char *text,
|
65
|
+
PopplerFindFlags options);
|
98
66
|
GList *poppler_page_find_text (PopplerPage *page,
|
99
67
|
const char *text);
|
100
68
|
void poppler_page_render_to_ps (PopplerPage *page,
|
101
69
|
PopplerPSFile *ps_file);
|
102
|
-
char *poppler_page_get_text (PopplerPage *page
|
70
|
+
char *poppler_page_get_text (PopplerPage *page);
|
71
|
+
char *poppler_page_get_selected_text (PopplerPage *page,
|
103
72
|
PopplerSelectionStyle style,
|
104
|
-
PopplerRectangle *
|
73
|
+
PopplerRectangle *selection);
|
74
|
+
cairo_region_t *poppler_page_get_selected_region (PopplerPage *page,
|
75
|
+
gdouble scale,
|
76
|
+
PopplerSelectionStyle style,
|
77
|
+
PopplerRectangle *selection);
|
105
78
|
GList *poppler_page_get_selection_region (PopplerPage *page,
|
106
79
|
gdouble scale,
|
107
80
|
PopplerSelectionStyle style,
|
@@ -111,20 +84,36 @@ GList *poppler_page_get_link_mapping (PopplerPage *pa
|
|
111
84
|
void poppler_page_free_link_mapping (GList *list);
|
112
85
|
GList *poppler_page_get_image_mapping (PopplerPage *page);
|
113
86
|
void poppler_page_free_image_mapping (GList *list);
|
114
|
-
#ifdef POPPLER_HAS_CAIRO
|
115
87
|
cairo_surface_t *poppler_page_get_image (PopplerPage *page,
|
116
88
|
gint image_id);
|
117
|
-
#endif /* POPPLER_HAS_CAIRO */
|
118
89
|
GList *poppler_page_get_form_field_mapping (PopplerPage *page);
|
119
90
|
void poppler_page_free_form_field_mapping (GList *list);
|
120
91
|
GList *poppler_page_get_annot_mapping (PopplerPage *page);
|
121
92
|
void poppler_page_free_annot_mapping (GList *list);
|
93
|
+
void poppler_page_add_annot (PopplerPage *page,
|
94
|
+
PopplerAnnot *annot);
|
95
|
+
void poppler_page_remove_annot (PopplerPage *page,
|
96
|
+
PopplerAnnot *annot);
|
122
97
|
void poppler_page_get_crop_box (PopplerPage *page,
|
123
98
|
PopplerRectangle *rect);
|
124
|
-
|
99
|
+
gboolean poppler_page_get_text_layout (PopplerPage *page,
|
100
|
+
PopplerRectangle **rectangles,
|
101
|
+
guint *n_rectangles);
|
102
|
+
GList *poppler_page_get_text_attributes (PopplerPage *page);
|
103
|
+
void poppler_page_free_text_attributes (GList *list);
|
125
104
|
|
126
105
|
/* A rectangle on a page, with coordinates in PDF points. */
|
127
106
|
#define POPPLER_TYPE_RECTANGLE (poppler_rectangle_get_type ())
|
107
|
+
/**
|
108
|
+
* PopplerRectangle:
|
109
|
+
* @x1: x coordinate of lower left corner
|
110
|
+
* @y1: y coordinate of lower left corner
|
111
|
+
* @x2: x coordinate of upper right corner
|
112
|
+
* @y2: y coordinate of upper right corner
|
113
|
+
*
|
114
|
+
* A #PopplerRectangle is used to describe
|
115
|
+
* locations on a page and bounding boxes
|
116
|
+
*/
|
128
117
|
struct _PopplerRectangle
|
129
118
|
{
|
130
119
|
gdouble x1;
|
@@ -140,6 +129,16 @@ void poppler_rectangle_free (PopplerRectangle *rectangle);
|
|
140
129
|
|
141
130
|
/* A color in RGB */
|
142
131
|
#define POPPLER_TYPE_COLOR (poppler_color_get_type ())
|
132
|
+
|
133
|
+
/**
|
134
|
+
* PopplerColor:
|
135
|
+
* @red: the red componment of color
|
136
|
+
* @green: the green component of color
|
137
|
+
* @blue: the blue component of color
|
138
|
+
*
|
139
|
+
* A #PopplerColor describes a RGB color. Color components
|
140
|
+
* are values between 0 and 65535
|
141
|
+
*/
|
143
142
|
struct _PopplerColor
|
144
143
|
{
|
145
144
|
guint16 red;
|
@@ -152,8 +151,48 @@ PopplerColor *poppler_color_new (void);
|
|
152
151
|
PopplerColor *poppler_color_copy (PopplerColor *color);
|
153
152
|
void poppler_color_free (PopplerColor *color);
|
154
153
|
|
154
|
+
/* Text attributes. */
|
155
|
+
#define POPPLER_TYPE_TEXT_ATTRIBUTES (poppler_text_attributes_get_type ())
|
156
|
+
/**
|
157
|
+
* PopplerTextAttributes:
|
158
|
+
* @font_name: font name
|
159
|
+
* @font_size: font size
|
160
|
+
* @is_underlined: if text is underlined
|
161
|
+
* @color: a #PopplerColor, the foreground color
|
162
|
+
* @start_index: start position this text attributes apply
|
163
|
+
* @end_index: end position this text text attributes apply
|
164
|
+
*
|
165
|
+
* A #PopplerTextAttributes is used to describe text attributes of a range of text
|
166
|
+
*
|
167
|
+
* Since: 0.18
|
168
|
+
*/
|
169
|
+
struct _PopplerTextAttributes
|
170
|
+
{
|
171
|
+
gchar *font_name;
|
172
|
+
gdouble font_size;
|
173
|
+
gboolean is_underlined;
|
174
|
+
PopplerColor color;
|
175
|
+
|
176
|
+
gint start_index;
|
177
|
+
gint end_index;
|
178
|
+
};
|
179
|
+
|
180
|
+
GType poppler_text_attributes_get_type (void) G_GNUC_CONST;
|
181
|
+
PopplerTextAttributes *poppler_text_attributes_new (void);
|
182
|
+
PopplerTextAttributes *poppler_text_attributes_copy (PopplerTextAttributes *text_attrs);
|
183
|
+
void poppler_text_attributes_free (PopplerTextAttributes *text_attrs);
|
184
|
+
|
155
185
|
/* Mapping between areas on the current page and PopplerActions */
|
156
186
|
#define POPPLER_TYPE_LINK_MAPPING (poppler_link_mapping_get_type ())
|
187
|
+
|
188
|
+
/**
|
189
|
+
* PopplerLinkMapping:
|
190
|
+
* @area: a #PopplerRectangle representing an area of the page
|
191
|
+
* @action: a #PopplerAction
|
192
|
+
*
|
193
|
+
* A #PopplerLinkMapping structure represents the location
|
194
|
+
* of @action on the page
|
195
|
+
*/
|
157
196
|
struct _PopplerLinkMapping
|
158
197
|
{
|
159
198
|
PopplerRectangle area;
|
@@ -167,6 +206,29 @@ void poppler_link_mapping_free (PopplerLinkMapping *mapping);
|
|
167
206
|
|
168
207
|
/* Page Transition */
|
169
208
|
#define POPPLER_TYPE_PAGE_TRANSITION (poppler_page_transition_get_type ())
|
209
|
+
|
210
|
+
/**
|
211
|
+
* PopplerPageTransition:
|
212
|
+
* @type: the type of transtition
|
213
|
+
* @alignment: the dimension in which the transition effect shall occur.
|
214
|
+
* Only for #POPPLER_PAGE_TRANSITION_SPLIT and #POPPLER_PAGE_TRANSITION_BLINDS transition types
|
215
|
+
* @direction: the direccion of motion for the transition effect.
|
216
|
+
* Only for #POPPLER_PAGE_TRANSITION_SPLIT, #POPPLER_PAGE_TRANSITION_BOX and #POPPLER_PAGE_TRANSITION_FLY
|
217
|
+
* transition types
|
218
|
+
* @duration: the duration of the transition effect
|
219
|
+
* @angle: the direction in which the specified transition effect shall moves,
|
220
|
+
* expressed in degrees counterclockwise starting from a left-to-right direction.
|
221
|
+
* Only for #POPPLER_PAGE_TRANSITION_WIPE, #POPPLER_PAGE_TRANSITION_GLITTER, #POPPLER_PAGE_TRANSITION_FLY,
|
222
|
+
* #POPPLER_PAGE_TRANSITION_COVER, #POPPLER_PAGE_TRANSITION_UNCOVER and #POPPLER_PAGE_TRANSITION_PUSH
|
223
|
+
* transition types
|
224
|
+
* @scale: the starting or ending scale at which the changes shall be drawn.
|
225
|
+
* Only for #POPPLER_PAGE_TRANSITION_FLY transition type
|
226
|
+
* @rectangular: whether the area that will be flown is rectangular and opaque.
|
227
|
+
* Only for #POPPLER_PAGE_TRANSITION_FLY transition type
|
228
|
+
*
|
229
|
+
* A #PopplerPageTransition structures describes a visual transition
|
230
|
+
* to use when moving between pages during a presentation
|
231
|
+
*/
|
170
232
|
struct _PopplerPageTransition
|
171
233
|
{
|
172
234
|
PopplerPageTransitionType type;
|
@@ -185,6 +247,15 @@ void poppler_page_transition_free (PopplerPageTransition *
|
|
185
247
|
|
186
248
|
/* Mapping between areas on the current page and images */
|
187
249
|
#define POPPLER_TYPE_IMAGE_MAPPING (poppler_image_mapping_get_type ())
|
250
|
+
|
251
|
+
/**
|
252
|
+
* PopplerImageMapping:
|
253
|
+
* @area: a #PopplerRectangle representing an area of the page
|
254
|
+
* @image_id: an image identifier
|
255
|
+
*
|
256
|
+
* A #PopplerImageMapping structure represents the location
|
257
|
+
* of an image on the page
|
258
|
+
*/
|
188
259
|
struct _PopplerImageMapping
|
189
260
|
{
|
190
261
|
PopplerRectangle area;
|
@@ -198,6 +269,15 @@ void poppler_image_mapping_free (PopplerImageMapping *mapp
|
|
198
269
|
|
199
270
|
/* Mapping between areas on the current page and form fields */
|
200
271
|
#define POPPLER_TYPE_FORM_FIELD_MAPPING (poppler_form_field_mapping_get_type ())
|
272
|
+
|
273
|
+
/**
|
274
|
+
* PopplerFormFieldMapping:
|
275
|
+
* @area: a #PopplerRectangle representing an area of the page
|
276
|
+
* @field: a #PopplerFormField
|
277
|
+
*
|
278
|
+
* A #PopplerFormFieldMapping structure represents the location
|
279
|
+
* of @field on the page
|
280
|
+
*/
|
201
281
|
struct _PopplerFormFieldMapping
|
202
282
|
{
|
203
283
|
PopplerRectangle area;
|
@@ -211,6 +291,15 @@ void poppler_form_field_mapping_free (PopplerFormFieldMa
|
|
211
291
|
|
212
292
|
/* Mapping between areas on the current page and annots */
|
213
293
|
#define POPPLER_TYPE_ANNOT_MAPPING (poppler_annot_mapping_get_type ())
|
294
|
+
|
295
|
+
/**
|
296
|
+
* PopplerAnnotMapping:
|
297
|
+
* @area: a #PopplerRectangle representing an area of the page
|
298
|
+
* @annot: a #PopplerAnnot
|
299
|
+
*
|
300
|
+
* A #PopplerAnnotMapping structure represents the location
|
301
|
+
* of @annot on the page
|
302
|
+
*/
|
214
303
|
struct _PopplerAnnotMapping
|
215
304
|
{
|
216
305
|
PopplerRectangle area;
|