pdftoimage 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +3 -1
- data/Gemfile.lock +15 -13
- data/lib/pdftoimage/image.rb +7 -4
- data/lib/pdftoimage/version.rb +1 -1
- data/spec/pdftoimage_spec.rb +5 -3
- data/spec/spec_helper.rb +12 -3
- metadata +8 -7
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,33 +1,35 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
pdftoimage (0.1.
|
4
|
+
pdftoimage (0.1.4)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: http://rubygems.org/
|
8
8
|
specs:
|
9
|
+
autotest (4.4.4)
|
9
10
|
diff-lcs (1.1.2)
|
10
11
|
ore-core (0.1.0)
|
11
12
|
rake (0.8.7)
|
12
|
-
rspec (2.0
|
13
|
-
rspec-core (~> 2.0
|
14
|
-
rspec-expectations (~> 2.0
|
15
|
-
rspec-mocks (~> 2.0
|
16
|
-
rspec-core (2.0
|
17
|
-
rspec-expectations (2.0
|
18
|
-
diff-lcs (
|
19
|
-
rspec-mocks (2.0
|
20
|
-
|
21
|
-
|
22
|
-
yard (0.6.1)
|
13
|
+
rspec (2.1.0)
|
14
|
+
rspec-core (~> 2.1.0)
|
15
|
+
rspec-expectations (~> 2.1.0)
|
16
|
+
rspec-mocks (~> 2.1.0)
|
17
|
+
rspec-core (2.1.0)
|
18
|
+
rspec-expectations (2.1.0)
|
19
|
+
diff-lcs (~> 1.1.2)
|
20
|
+
rspec-mocks (2.1.0)
|
21
|
+
spork (0.8.4)
|
22
|
+
yard (0.6.2)
|
23
23
|
|
24
24
|
PLATFORMS
|
25
25
|
ruby
|
26
26
|
|
27
27
|
DEPENDENCIES
|
28
|
+
autotest
|
28
29
|
bundler (~> 1.0.0)
|
29
30
|
ore-core (~> 0.1.0)
|
30
31
|
pdftoimage!
|
31
32
|
rake (~> 0.8.7)
|
32
|
-
rspec (
|
33
|
+
rspec (>= 2.1.0)
|
34
|
+
spork
|
33
35
|
yard (~> 0.6.0)
|
data/lib/pdftoimage/image.rb
CHANGED
@@ -72,7 +72,7 @@ module PDFToImage
|
|
72
72
|
end
|
73
73
|
end
|
74
74
|
|
75
|
-
private
|
75
|
+
private
|
76
76
|
|
77
77
|
def generate_temp_file
|
78
78
|
if @opened == false
|
@@ -95,9 +95,12 @@ module PDFToImage
|
|
95
95
|
# prepend a '0' to the page count when the total number of
|
96
96
|
# pages is 10, 100, 1000, 10000, etc. I hate putting this here,
|
97
97
|
# but whatever...
|
98
|
-
|
99
|
-
|
100
|
-
|
98
|
+
|
99
|
+
# TODO: Keep an eye on this. This suddenly started causing problems.
|
100
|
+
# Did poppler_utils change?
|
101
|
+
# if @page_count.to_s.reverse.to_i == 1 && num_zeroes > 0
|
102
|
+
# num_zeroes = num_zeroes - 1
|
103
|
+
# end
|
101
104
|
|
102
105
|
if cur_page_len == total_page_len
|
103
106
|
@page
|
data/lib/pdftoimage/version.rb
CHANGED
data/spec/pdftoimage_spec.rb
CHANGED
@@ -14,9 +14,11 @@ describe PDFToImage do
|
|
14
14
|
|
15
15
|
it "should allow saving" do
|
16
16
|
@pages = PDFToImage.open('spec/3pages.pdf')
|
17
|
-
@pages
|
18
|
-
|
19
|
-
|
17
|
+
@pages.each do |page|
|
18
|
+
page.save('spec/tmp.jpg')
|
19
|
+
File.exists?('spec/tmp.jpg').should equal true
|
20
|
+
File.unlink('spec/tmp.jpg')
|
21
|
+
end
|
20
22
|
end
|
21
23
|
|
22
24
|
it "should allow resizing and quality control" do
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pdftoimage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 17
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 5
|
10
|
+
version: 0.1.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Rob Flynn
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2011-03-08 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -51,7 +51,8 @@ dependencies:
|
|
51
51
|
type: :development
|
52
52
|
version_requirements: *id002
|
53
53
|
description: A ruby gem for converting PDF documents into a series of images. This module is based off poppler_utils and ImageMagick.
|
54
|
-
email:
|
54
|
+
email:
|
55
|
+
- rob@thingerly.com
|
55
56
|
executables: []
|
56
57
|
|
57
58
|
extensions: []
|
@@ -113,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
114
|
requirements: []
|
114
115
|
|
115
116
|
rubyforge_project: pdftoimage
|
116
|
-
rubygems_version: 1.
|
117
|
+
rubygems_version: 1.5.2
|
117
118
|
signing_key:
|
118
119
|
specification_version: 3
|
119
120
|
summary: A ruby gem for converting PDF documents into a series of images.
|