poppler 3.0.8 → 3.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/ext/poppler/extconf.rb +1 -1
- data/ext/poppler/rbpoppler-page.c +9 -9
- data/sample/pdf2.rb +1 -1
- data/test/run-test.rb +5 -3
- data/test/test_page.rb +9 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60162592b45f542c99611ed925d16992fdda6407
|
4
|
+
data.tar.gz: e9c1c7bdae852109b5f19c33db20deb6f133bff7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df2600883bdfdbcb9b9aadd101d1602006095f20d6b6a7673bba41bcdd87c944420f6dd6e787f3c1b2cf17c6968d22fb3e6d82940eb3f17b43f26361fc11f7ad
|
7
|
+
data.tar.gz: 0d1031f4bb50c8a049882b5af2331a8afa4f3525450df98e14b81b30ea3ea2ca2d6334fd8c846dd47e434d8654ac9c3d0158173038aaf0349182d705077a1779
|
data/Rakefile
CHANGED
@@ -49,7 +49,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
|
|
49
49
|
:name => "sqlite-autoconf",
|
50
50
|
:download_base_url => "http://www.sqlite.org/2016",
|
51
51
|
:label => "SQLite",
|
52
|
-
:version => "
|
52
|
+
:version => "3140100",
|
53
53
|
:compression_method => "gz",
|
54
54
|
:windows => {
|
55
55
|
:configure_args => [],
|
data/ext/poppler/extconf.rb
CHANGED
@@ -30,7 +30,7 @@ rescue LoadError
|
|
30
30
|
require 'mkmf-gnome2'
|
31
31
|
end
|
32
32
|
|
33
|
-
["glib2", "atk"
|
33
|
+
["glib2", "atk"].each do |package|
|
34
34
|
directory = "#{package}#{version_suffix}"
|
35
35
|
build_dir = "#{directory}/tmp/#{RUBY_PLATFORM}/#{package}/#{RUBY_VERSION}"
|
36
36
|
add_depend_package(package, "#{directory}/ext/#{package}",
|
@@ -205,17 +205,17 @@ rg_text_layout(VALUE self)
|
|
205
205
|
guint n_rectangles;
|
206
206
|
|
207
207
|
if (poppler_page_get_text_layout(SELF(self), &rectangles, &n_rectangles)) {
|
208
|
-
VALUE
|
209
|
-
VALUE ary;
|
208
|
+
VALUE rb_rectangles;
|
210
209
|
guint i;
|
211
|
-
|
212
|
-
|
213
|
-
|
210
|
+
|
211
|
+
rb_rectangles = rb_ary_new2(n_rectangles);
|
212
|
+
for (i = 0; i < n_rectangles; i++) {
|
213
|
+
rb_ary_push(rb_rectangles,
|
214
|
+
POPPLERRECTANGLE2RVAL(&(rectangles[i])));
|
214
215
|
}
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
return ary;
|
216
|
+
g_free(rectangles);
|
217
|
+
|
218
|
+
return rb_rectangles;
|
219
219
|
} else {
|
220
220
|
return Qnil;
|
221
221
|
}
|
data/sample/pdf2.rb
CHANGED
@@ -115,7 +115,7 @@ def to_pixbuf_with_cairo(input, page_number, scale, rotate)
|
|
115
115
|
temp = Tempfile.new("pdf2")
|
116
116
|
cr.target.write_to_png(temp.path)
|
117
117
|
cr.target.finish
|
118
|
-
|
118
|
+
GdkPixbuf::Pixbuf.new(:file => temp.path)
|
119
119
|
end
|
120
120
|
|
121
121
|
unless Poppler.cairo_available?
|
data/test/run-test.rb
CHANGED
@@ -15,10 +15,12 @@ require 'glib-test-init'
|
|
15
15
|
[pango_dir, "pango"],
|
16
16
|
[glib_dir, "glib2"],
|
17
17
|
[base_dir, "poppler"]].each do |dir, module_name|
|
18
|
-
if
|
19
|
-
|
18
|
+
if File.exist?(File.join(dir, "Makefile"))
|
19
|
+
if have_make
|
20
|
+
system("cd #{dir.dump} && make > /dev/null") or exit(false)
|
21
|
+
end
|
22
|
+
$LOAD_PATH.unshift(File.join(dir, "ext", module_name))
|
20
23
|
end
|
21
|
-
$LOAD_PATH.unshift(File.join(dir, "ext", module_name))
|
22
24
|
$LOAD_PATH.unshift(File.join(dir, "lib"))
|
23
25
|
end
|
24
26
|
require "poppler"
|
data/test/test_page.rb
CHANGED
@@ -30,6 +30,15 @@ class TestPage < Test::Unit::TestCase
|
|
30
30
|
assert_kind_of(Poppler::Annotation, mapping.annotation)
|
31
31
|
end
|
32
32
|
|
33
|
+
def test_text_layout
|
34
|
+
only_poppler_version(0, 16, 0)
|
35
|
+
document = Poppler::Document.new(form_pdf)
|
36
|
+
page = document[0]
|
37
|
+
layout = page.text_layout
|
38
|
+
assert_equal([60, 31, 79, 60],
|
39
|
+
layout[0].to_a.collect(&:round))
|
40
|
+
end
|
41
|
+
|
33
42
|
private
|
34
43
|
def find_first_image_mapping(document)
|
35
44
|
document.each do |page|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: poppler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Ruby-GNOME2 Project Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cairo
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 3.0.
|
33
|
+
version: 3.0.9
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 3.0.
|
40
|
+
version: 3.0.9
|
41
41
|
description: Ruby/Poppler is a Ruby binding of poppler-glib.
|
42
42
|
email: ruby-gnome2-devel-en@lists.sourceforge.net
|
43
43
|
executables: []
|
@@ -108,7 +108,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
108
108
|
requirements:
|
109
109
|
- - ">="
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
version: 1.
|
111
|
+
version: 2.1.0
|
112
112
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
114
|
- - ">="
|