pdf-reader 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +7 -0
- data/lib/pdf/hash.rb +1 -1
- data/lib/pdf/reader.rb +3 -3
- data/lib/pdf/reader/parser.rb +5 -5
- metadata +11 -8
data/CHANGELOG
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
v0.9.1 (21st December 2010)
|
2
|
+
- force gem to only install on ruby 1.8.7 or higher
|
3
|
+
- maintaining supprot for earlier versions takes more time than I have
|
4
|
+
available at the moment
|
5
|
+
- bug: fix parsing of obscure pdf name format
|
6
|
+
- bug: fix behaviour when loaded in confunction with htmldoc gem
|
7
|
+
|
1
8
|
v0.9.0 (19th November 2010)
|
2
9
|
- support for pdf 1.5+ files that use object and xref streams
|
3
10
|
- support streams that use a flate filter with the predictor option
|
data/lib/pdf/hash.rb
CHANGED
data/lib/pdf/reader.rb
CHANGED
@@ -115,7 +115,7 @@ module PDF
|
|
115
115
|
ohash = ObjectHash.new(io)
|
116
116
|
|
117
117
|
if ohash.trailer[:Encrypt]
|
118
|
-
raise PDF::Reader::UnsupportedFeatureError, 'PDF::Reader cannot read encrypted PDF files'
|
118
|
+
raise ::PDF::Reader::UnsupportedFeatureError, 'PDF::Reader cannot read encrypted PDF files'
|
119
119
|
end
|
120
120
|
|
121
121
|
options = {:pages => true, :raw_text => false, :metadata => true}
|
@@ -140,8 +140,8 @@ module PDF
|
|
140
140
|
|
141
141
|
def strategies
|
142
142
|
@strategies ||= [
|
143
|
-
PDF::Reader::MetadataStrategy,
|
144
|
-
PDF::Reader::PagesStrategy
|
143
|
+
::PDF::Reader::MetadataStrategy,
|
144
|
+
::PDF::Reader::PagesStrategy
|
145
145
|
]
|
146
146
|
end
|
147
147
|
end
|
data/lib/pdf/reader/parser.rb
CHANGED
@@ -79,10 +79,10 @@ class PDF::Reader
|
|
79
79
|
|
80
80
|
obj = parse_token
|
81
81
|
post_obj = parse_token
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
82
|
+
if post_obj == "stream"
|
83
|
+
stream(obj)
|
84
|
+
else
|
85
|
+
obj
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
@@ -109,7 +109,7 @@ class PDF::Reader
|
|
109
109
|
# reads a PDF name from the buffer and converts it to a Ruby Symbol
|
110
110
|
def pdf_name
|
111
111
|
tok = @buffer.token
|
112
|
-
tok.scan(/#(
|
112
|
+
tok.scan(/#([A-Fa-f0-9]{2})/).each do |find|
|
113
113
|
replace = find[0].hex.chr
|
114
114
|
tok.gsub!("#"+find[0], replace)
|
115
115
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pdf-reader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 57
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 0.9.
|
9
|
+
- 1
|
10
|
+
version: 0.9.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- James Healy
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-12-21 00:00:00 +11:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -77,7 +77,8 @@ dependencies:
|
|
77
77
|
type: :runtime
|
78
78
|
version_requirements: *id004
|
79
79
|
description: The PDF::Reader library implements a PDF parser conforming as much as possible to the PDF specification from Adobe
|
80
|
-
email:
|
80
|
+
email:
|
81
|
+
- jimmy@deefa.com
|
81
82
|
executables:
|
82
83
|
- pdf_object
|
83
84
|
- pdf_text
|
@@ -157,10 +158,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
157
158
|
requirements:
|
158
159
|
- - ">="
|
159
160
|
- !ruby/object:Gem::Version
|
160
|
-
hash:
|
161
|
+
hash: 57
|
161
162
|
segments:
|
162
|
-
-
|
163
|
-
|
163
|
+
- 1
|
164
|
+
- 8
|
165
|
+
- 7
|
166
|
+
version: 1.8.7
|
164
167
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
165
168
|
none: false
|
166
169
|
requirements:
|