poppler 3.1.0-x64-mingw32 → 3.1.1-x64-mingw32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/ext/poppler/extconf.rb +1 -1
  3. data/ext/poppler/rbpoppler-action.c +50 -20
  4. data/ext/poppler/rbpoppler-index-iter.c +3 -1
  5. data/lib/2.2/poppler.so +0 -0
  6. data/lib/2.3/poppler.so +0 -0
  7. data/lib/2.4/poppler.so +0 -0
  8. data/test/fixtures/outline.odt +0 -0
  9. data/test/fixtures/outline.pdf +0 -0
  10. data/test/poppler-test-utils.rb +4 -0
  11. data/test/test-index-iter.rb +49 -0
  12. data/vendor/local/bin/cjpeg.exe +0 -0
  13. data/vendor/local/bin/djpeg.exe +0 -0
  14. data/vendor/local/bin/jpegtran.exe +0 -0
  15. data/vendor/local/bin/libjpeg-9.dll +0 -0
  16. data/vendor/local/bin/libopenjp2.dll +0 -0
  17. data/vendor/local/bin/libpoppler-59.dll +0 -0
  18. data/vendor/local/bin/libpoppler-cpp-0.dll +0 -0
  19. data/vendor/local/bin/libpoppler-glib-8.dll +0 -0
  20. data/vendor/local/bin/libsqlite3-0.dll +0 -0
  21. data/vendor/local/bin/opj_compress.exe +0 -0
  22. data/vendor/local/bin/opj_decompress.exe +0 -0
  23. data/vendor/local/bin/opj_dump.exe +0 -0
  24. data/vendor/local/bin/pdfdetach.exe +0 -0
  25. data/vendor/local/bin/pdffonts.exe +0 -0
  26. data/vendor/local/bin/pdfimages.exe +0 -0
  27. data/vendor/local/bin/pdfinfo.exe +0 -0
  28. data/vendor/local/bin/pdfseparate.exe +0 -0
  29. data/vendor/local/bin/pdftocairo.exe +0 -0
  30. data/vendor/local/bin/pdftohtml.exe +0 -0
  31. data/vendor/local/bin/pdftoppm.exe +0 -0
  32. data/vendor/local/bin/pdftops.exe +0 -0
  33. data/vendor/local/bin/pdftotext.exe +0 -0
  34. data/vendor/local/bin/pdfunite.exe +0 -0
  35. data/vendor/local/bin/rdjpgcom.exe +0 -0
  36. data/vendor/local/bin/sqlite3.exe +0 -0
  37. data/vendor/local/bin/wrjpgcom.exe +0 -0
  38. data/vendor/local/lib/libjpeg.dll.a +0 -0
  39. data/vendor/local/lib/libopenjp2.dll.a +0 -0
  40. data/vendor/local/lib/libpoppler-cpp.dll.a +0 -0
  41. data/vendor/local/lib/libpoppler-glib.a +0 -0
  42. data/vendor/local/lib/libpoppler-glib.dll.a +0 -0
  43. data/vendor/local/lib/libpoppler.a +0 -0
  44. data/vendor/local/lib/libpoppler.dll.a +0 -0
  45. data/vendor/local/lib/libsqlite3.dll.a +0 -0
  46. metadata +12 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 620e47900c78b6747a00e840c9e79a51a3af3111
4
- data.tar.gz: a0023300eec84e3cfc447d4d7a97906b704926cd
3
+ metadata.gz: 9300708c96e30a3654e2165011d8468950264f4f
4
+ data.tar.gz: be33f409f221649259e5e652e3ef3ed8db354d68
5
5
  SHA512:
6
- metadata.gz: a2eb55c4bdef796d693f3fd237194432a6f5b216b9fc65467aa1e0ad460dcb8ef3401bef84fb73d06f4b687d7346fd096317976763f7fb864a89332571d6ef9d
7
- data.tar.gz: 4357cceaebcd1170bc0b8c8fd41169eb78438104ba044e836ad7e0a09966777113a9efcdc6e1e92c1b0b3687f4f3e504bb4732a1cf15401ade34a3cc8f922775
6
+ metadata.gz: 4919ef3effd92b536cc87e618a2e08b9e811b41958ba35c327b083ea6aa6c3b6519faf4c305c32851a8227a2fe20f00ef9c93b82fe061b718f15eb33126c8fda
7
+ data.tar.gz: fc23491acccb4f9f48354009b7a0cfee83bf37237c19909681caa252148e31786925c5a5eb58d7edee6485e0723931dd54292c045f347b698b0d56a25c0323d4
@@ -30,7 +30,7 @@ rescue LoadError
30
30
  require 'mkmf-gnome2'
31
31
  end
32
32
 
33
- ["glib2", "atk"].each do |package|
33
+ ["glib2", "gdk_pixbuf2"].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}",
@@ -308,48 +308,78 @@ Init_poppler_action(VALUE mPoppler)
308
308
  rbg_define_method(rb_cPopplerActionAny, "type", action_any_type, 0);
309
309
  DEFINE_ACTION_ACCESSOR(rb_cPopplerActionAny, any, title);
310
310
 
311
- rb_cPopplerActionUnknown = rb_define_class_under(mPoppler, "ActionUnknown",
312
- rb_cPopplerAction);
313
-
314
- rb_cPopplerActionGotoDest = rb_define_class_under(mPoppler, "ActionGotoDest",
315
- rb_cPopplerActionAny);
311
+ rb_cPopplerActionUnknown =
312
+ G_DEF_CLASS_WITH_PARENT(POPPLER_ACTION_TYPE_UNKNOWN,
313
+ "ActionUnknown",
314
+ mPoppler,
315
+ rb_cPopplerAction);
316
+
317
+ rb_cPopplerActionGotoDest =
318
+ G_DEF_CLASS_WITH_PARENT(POPPLER_ACTION_TYPE_GOTO_DEST,
319
+ "ActionGotoDest",
320
+ mPoppler,
321
+ rb_cPopplerActionAny);
316
322
  DEFINE_ACTION_ACCESSOR(rb_cPopplerActionGotoDest, goto_dest, dest);
317
323
 
318
- rb_cPopplerActionGotoRemote = rb_define_class_under(mPoppler, "ActionGotoRemote",
319
- rb_cPopplerActionAny);
324
+ rb_cPopplerActionGotoRemote =
325
+ G_DEF_CLASS_WITH_PARENT(POPPLER_ACTION_TYPE_GOTO_REMOTE,
326
+ "ActionGotoRemote",
327
+ mPoppler,
328
+ rb_cPopplerActionAny);
320
329
  DEFINE_ACTION_ACCESSOR(rb_cPopplerActionGotoRemote, goto_remote, file_name);
321
330
  DEFINE_ACTION_ACCESSOR(rb_cPopplerActionGotoRemote, goto_remote, dest);
322
331
 
323
- rb_cPopplerActionLaunch = rb_define_class_under(mPoppler, "ActionLaunch",
324
- rb_cPopplerActionAny);
332
+ rb_cPopplerActionLaunch =
333
+ G_DEF_CLASS_WITH_PARENT(POPPLER_ACTION_TYPE_LAUNCH,
334
+ "ActionLaunch",
335
+ mPoppler,
336
+ rb_cPopplerActionAny);
325
337
  DEFINE_ACTION_ACCESSOR(rb_cPopplerActionLaunch, launch, file_name);
326
338
  DEFINE_ACTION_ACCESSOR(rb_cPopplerActionLaunch, launch, params);
327
339
 
328
- rb_cPopplerActionURI = rb_define_class_under(mPoppler, "ActionURI", rb_cPopplerActionAny);
340
+ rb_cPopplerActionURI =
341
+ G_DEF_CLASS_WITH_PARENT(POPPLER_ACTION_TYPE_URI,
342
+ "ActionURI",
343
+ mPoppler,
344
+ rb_cPopplerActionAny);
329
345
  DEFINE_ACTION_ACCESSOR(rb_cPopplerActionURI, uri, uri);
330
346
 
331
- rb_cPopplerActionNamed = rb_define_class_under(mPoppler, "ActionNamed",
332
- rb_cPopplerActionAny);
347
+ rb_cPopplerActionNamed =
348
+ G_DEF_CLASS_WITH_PARENT(POPPLER_ACTION_TYPE_NAMED,
349
+ "ActionNamed",
350
+ mPoppler,
351
+ rb_cPopplerActionAny);
333
352
  DEFINE_ACTION_ACCESSOR(rb_cPopplerActionNamed, named, named_dest);
334
353
 
335
354
  #if POPPLER_CHECK_VERSION(0, 14, 0)
336
- rb_cPopplerActionMovie = rb_define_class_under(mPoppler, "ActionMovie",
337
- rb_cPopplerActionAny);
355
+ rb_cPopplerActionMovie =
356
+ G_DEF_CLASS_WITH_PARENT(POPPLER_ACTION_TYPE_MOVIE,
357
+ "ActionMovie",
358
+ mPoppler,
359
+ rb_cPopplerActionAny);
338
360
  DEFINE_ACTION_ACCESSOR(rb_cPopplerActionMovie, movie, movie);
339
361
 
340
- rb_cPopplerActionRendition = rb_define_class_under(mPoppler, "ActionRendtion",
341
- rb_cPopplerActionAny);
362
+ rb_cPopplerActionRendition =
363
+ G_DEF_CLASS_WITH_PARENT(POPPLER_ACTION_TYPE_RENDITION,
364
+ "ActionRendtion",
365
+ mPoppler,
366
+ rb_cPopplerActionAny);
342
367
  DEFINE_ACTION_ACCESSOR(rb_cPopplerActionRendition, rendition, media);
343
368
 
344
- rb_cPopplerActionOCGState = rb_define_class_under(mPoppler, "ActionOCGState",
345
- rb_cPopplerActionAny);
369
+ rb_cPopplerActionOCGState =
370
+ G_DEF_CLASS_WITH_PARENT(POPPLER_ACTION_TYPE_OCG_STATE,
371
+ "ActionOCGState",
372
+ mPoppler,
373
+ rb_cPopplerActionAny);
346
374
  DEFINE_ACTION_ACCESSOR(rb_cPopplerActionOCGState, ocg_state, state_list);
347
375
  #endif
348
376
 
349
377
  #if POPPLER_CHECK_VERSION(0, 18, 0)
350
378
  rb_cPopplerActionJavaScript =
351
- rb_define_class_under(mPoppler, "ActionJavaScript",
352
- rb_cPopplerActionAny);
379
+ G_DEF_CLASS_WITH_PARENT(POPPLER_ACTION_TYPE_JAVASCRIPT,
380
+ "ActionJavaScript",
381
+ mPoppler,
382
+ rb_cPopplerActionAny);
353
383
  DEFINE_ACTION_ACCESSOR(rb_cPopplerActionJavaScript, javascript, script);
354
384
  #endif
355
385
 
@@ -44,7 +44,6 @@ rg_initialize(VALUE self, VALUE document)
44
44
  PopplerIndexIter *iter;
45
45
  iter = poppler_index_iter_new(RVAL2POPPLERDOCUMENT(document));
46
46
  G_INITIALIZE(self, iter);
47
- poppler_index_iter_free(iter);
48
47
  rb_ivar_set(self, id_valid, CBOOL2RVAL(iter));
49
48
  return Qnil;
50
49
  }
@@ -57,6 +56,9 @@ rg_child(VALUE self)
57
56
 
58
57
  CHECK_IITER_IS_VALID(self);
59
58
  child = poppler_index_iter_get_child(RVAL2POPPLERINDEXITER(self));
59
+ if (!child)
60
+ return Qnil;
61
+
60
62
  rb_child = POPPLERINDEXITER2RVAL(child);
61
63
  rb_ivar_set(rb_child, id_valid, CBOOL2RVAL(child));
62
64
  poppler_index_iter_free(child);
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -37,6 +37,10 @@ module PopplerTestUtils
37
37
  File.join(fixtures_dir, "image.png")
38
38
  end
39
39
 
40
+ def outline_pdf
41
+ File.join(fixtures_dir, "outline.pdf")
42
+ end
43
+
40
44
  def later_version?(major, minor, micro=nil)
41
45
  micro ||= 0
42
46
  (Poppler::BUILD_VERSION <=> [major, minor, micro]) >= 0
@@ -0,0 +1,49 @@
1
+ # Copyright (C) 2017 Ruby-GNOME2 Project Team
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ class TestIndexIter < Test::Unit::TestCase
18
+ def test_title
19
+ document = Poppler::Document.new(outline_pdf)
20
+ assert_equal([
21
+ [
22
+ "Heading1",
23
+ [
24
+ [
25
+ "Heading2",
26
+ [
27
+ [
28
+ "Heading3",
29
+ ],
30
+ ],
31
+ ],
32
+ ],
33
+ ],
34
+ ],
35
+ collect_titles(document.index_iter))
36
+ end
37
+
38
+ private
39
+ def collect_titles(iter)
40
+ iter.collect do
41
+ titles = [iter.action.title]
42
+ child_iter = iter.child
43
+ if child_iter
44
+ titles << collect_titles(child_iter)
45
+ end
46
+ titles
47
+ end
48
+ end
49
+ end
Binary file
Binary file
Binary file
Binary file
Binary file
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.1.0
4
+ version: 3.1.1
5
5
  platform: x64-mingw32
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-13 00:00:00.000000000 Z
11
+ date: 2017-01-26 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.1.0
33
+ version: 3.1.1
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.1.0
40
+ version: 3.1.1
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: []
@@ -80,6 +80,7 @@ files:
80
80
  - extconf.rb
81
81
  - lib/2.2/poppler.so
82
82
  - lib/2.3/poppler.so
83
+ - lib/2.4/poppler.so
83
84
  - lib/poppler.rb
84
85
  - sample/number-pdf.rb
85
86
  - sample/pdf2.rb
@@ -89,8 +90,11 @@ files:
89
90
  - sample/pdfdiv.rb
90
91
  - test/fixtures/image.pdf
91
92
  - test/fixtures/image.png
93
+ - test/fixtures/outline.odt
94
+ - test/fixtures/outline.pdf
92
95
  - test/poppler-test-utils.rb
93
96
  - test/run-test.rb
97
+ - test/test-index-iter.rb
94
98
  - test/test-version.rb
95
99
  - test/test_annotation.rb
96
100
  - test/test_color.rb
@@ -254,7 +258,10 @@ required_ruby_version: !ruby/object:Gem::Requirement
254
258
  requirements:
255
259
  - - ">="
256
260
  - !ruby/object:Gem::Version
257
- version: 2.1.0
261
+ version: '2.1'
262
+ - - "<"
263
+ - !ruby/object:Gem::Version
264
+ version: '2.5'
258
265
  required_rubygems_version: !ruby/object:Gem::Requirement
259
266
  requirements:
260
267
  - - ">="