pdf-reader 1.3.3 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ea0ed09942ae54e900f0387fd9e46213a6db401b
4
- data.tar.gz: baa54a8a557c8ad86bf3760c0e361f84c16728ef
3
+ metadata.gz: 64f7a6d7ba48a6c2e9f665c30ccea5d402d1ecd2
4
+ data.tar.gz: 0e80a016f048834d6af4d392ab8d589753f6c907
5
5
  SHA512:
6
- metadata.gz: f276cce73b972af13426088bc33217efd576d4e7d7f9dc866aee27950d8cad0f8e8831308314599608a6161cf1aacd4efa1b228c39a6dbff4f78fbc606802c49
7
- data.tar.gz: a9a9d46c2f2eebe93dd15d92fc22d6fb69577fba113bf8f123f7f3efb06d1dcaebe2238c07cc6e0dadcd54f96ed47a4cc57eb043f59d769d397fb36b38a1cc88
6
+ metadata.gz: 2761c0e29839e6e832f08d6401ab585e0a34fb139c0d79678a24496b6b5ac97fd5c7160f8ab039d493629e759efa05ae0d69c370f52cb845015695945724ff10
7
+ data.tar.gz: 636cad85e5cbabc92f2752680f43c875da012bd3f0ec2047faa8653eeb84982c8935dbfb31f145e21bb5cec6984d1e05e0dd4b2e9d34dac7e5255133dc7075a3
data/CHANGELOG CHANGED
@@ -1,3 +1,11 @@
1
+ v1.4.0 (22nd February 2016)
2
+ - raise minimum ruby version to 1.9.3
3
+ - print warnings to stderr when deprecated methods are used. These methods have been
4
+ deprecated for 4 years, so hopefully few people are depending on them
5
+ - Fix exception when a npn-breakng space (character 160) is used with a
6
+ built-in fint (helvetica, etc)
7
+ - various bug fixes
8
+
1
9
  v1.3.3 (7th April 2013)
2
10
  - various bug fixes
3
11
 
data/Rakefile CHANGED
@@ -1,11 +1,8 @@
1
- require "rubygems"
2
- require "bundler"
3
- Bundler.setup
4
-
5
- require 'yaml'
6
- require 'rake'
7
- require 'rdoc/task'
8
- require 'rspec/core/rake_task'
1
+ require "bundler/gem_tasks"
2
+ require "digest/md5"
3
+ require "rdoc/task"
4
+ require "rspec/core/rake_task"
5
+ require "yaml"
9
6
 
10
7
  # Cane requires ripper, which appears to only work on MRI 1.9
11
8
  if RUBY_VERSION >= "1.9" && RUBY_ENGINE == "ruby"
@@ -31,7 +28,7 @@ else
31
28
  end
32
29
 
33
30
  desc "Run all rspec files"
34
- RSpec::Core::RakeTask.new("spec") do |t|
31
+ RSpec::Core::RakeTask.new(:spec) do |t|
35
32
  t.rspec_opts = ["--color", "--format progress"]
36
33
  t.ruby_opts = "-w"
37
34
  end
@@ -56,7 +53,7 @@ task :integrity_yaml do
56
53
  path_without_spec = path.gsub("spec/","")
57
54
  data[path_without_spec] = {
58
55
  :bytes => File.size(path),
59
- :md5 => `md5sum "#{path}"`.split.first
56
+ :md5 => Digest::MD5.hexdigest(File.read(path))
60
57
  } if File.file?(path)
61
58
  end
62
59
  File.open("spec/integrity.yml","wb") { |f| f.write YAML.dump(data)}
@@ -115,6 +115,10 @@ module PDF
115
115
  @cache = PDF::Reader::ObjectCache.new
116
116
  opts.merge!(:cache => @cache)
117
117
  @objects = PDF::Reader::ObjectHash.new(input, opts)
118
+ else
119
+ msg = "Calling PDF::Reader#new with no arguments is deprecated and will be removed "
120
+ msg += "in the 2.0 release"
121
+ $stderr.puts(msg)
118
122
  end
119
123
  end
120
124
 
@@ -167,6 +171,8 @@ module PDF
167
171
  # Parse the file with the given name, sending events to the given receiver.
168
172
  #
169
173
  def self.file(name, receivers, opts = {})
174
+ msg = "PDF::Reader#file is deprecated and will be removed in the 2.0 release"
175
+ $stderr.puts(msg)
170
176
  File.open(name,"rb") do |f|
171
177
  new.parse(f, receivers, opts)
172
178
  end
@@ -178,6 +184,8 @@ module PDF
178
184
  # Parse the given string, sending events to the given receiver.
179
185
  #
180
186
  def self.string(str, receivers, opts = {})
187
+ msg = "PDF::Reader#string is deprecated and will be removed in the 2.0 release"
188
+ $stderr.puts(msg)
181
189
  StringIO.open(str) do |s|
182
190
  new.parse(s, receivers, opts)
183
191
  end
@@ -190,6 +198,8 @@ module PDF
190
198
  # represents the requested pdf object
191
199
  #
192
200
  def self.object_file(name, id, gen = 0)
201
+ msg = "PDF::Reader#object_file is deprecated and will be removed in the 2.0 release"
202
+ $stderr.puts(msg)
193
203
  File.open(name,"rb") { |f|
194
204
  new.object(f, id.to_i, gen.to_i)
195
205
  }
@@ -202,6 +212,8 @@ module PDF
202
212
  # the requested pdf object
203
213
  #
204
214
  def self.object_string(str, id, gen = 0)
215
+ msg = "PDF::Reader#object_string is deprecated and will be removed in the 2.0 release"
216
+ $stderr.puts(msg)
205
217
  StringIO.open(str) { |s|
206
218
  new.object(s, id.to_i, gen.to_i)
207
219
  }
@@ -254,6 +266,8 @@ module PDF
254
266
  # Given an IO object that contains PDF data, parse it.
255
267
  #
256
268
  def parse(io, receivers, opts = {})
269
+ msg = "PDF::Reader#parse is deprecated and will be removed in the 2.0 release"
270
+ $stderr.puts(msg)
257
271
  ohash = ObjectHash.new(io)
258
272
 
259
273
  options = {:pages => true, :raw_text => false, :metadata => true}
@@ -272,6 +286,8 @@ module PDF
272
286
  # Given an IO object that contains PDF data, return the contents of a single object
273
287
  #
274
288
  def object (io, id, gen)
289
+ msg = "PDF::Reader#object is deprecated and will be removed in the 2.0 release"
290
+ $stderr.puts(msg)
275
291
  @objects = ObjectHash.new(io)
276
292
 
277
293
  @objects.deref(Reference.new(id, gen))
@@ -371,5 +387,6 @@ require 'pdf/reader/page_state'
371
387
  require 'pdf/reader/page_text_receiver'
372
388
  require 'pdf/reader/token'
373
389
  require 'pdf/reader/xref'
390
+ require 'pdf/reader/orientation_detector'
374
391
  require 'pdf/reader/page'
375
392
  require 'pdf/hash'
@@ -53,6 +53,7 @@ class PDF::Reader
53
53
  end
54
54
 
55
55
  def basefont=(font)
56
+ $stderr.puts "Font#basefont= is deprecated and will be removed in the 2.0 release"
56
57
  @encoding ||= default_encoding(font)
57
58
  @basefont = font
58
59
  end
@@ -105,7 +106,7 @@ class PDF::Reader
105
106
  elsif @subtype == :Type3
106
107
  PDF::Reader::WidthCalculator::TypeOneOrThree.new(self)
107
108
  elsif @subtype == :TrueType
108
- PDF::Reader::WidthCalculator::TypeOneOrThree.new(self)
109
+ PDF::Reader::WidthCalculator::TrueType.new(self)
109
110
  elsif @subtype == :CIDFontType0 || @subtype == :CIDFontType2
110
111
  PDF::Reader::WidthCalculator::Composite.new(self)
111
112
  else
@@ -53,7 +53,6 @@ class PDF::Reader
53
53
  end
54
54
  char_metric = ttf_program_stream.horizontal_metrics.metrics[glyph_id]
55
55
  if char_metric
56
- puts "Char Code: #{char_code} -- Advance Width: #{char_metric.advance_width}" > 0
57
56
  return char_metric.advance_width
58
57
  end
59
58
  end
@@ -85,6 +85,7 @@ module PDF
85
85
  result = ''
86
86
  until (code = stream.read) == CODE_EOD
87
87
  if code == CODE_CLEAR_TABLE
88
+ stream.set_bits_in_chunk(9)
88
89
  string_table = StringTable.new
89
90
  code = stream.read
90
91
  break if code == CODE_EOD
@@ -0,0 +1,33 @@
1
+ # coding: utf-8
2
+
3
+ class PDF::Reader
4
+ # Small util class for detecting the orientation of a single PDF page. Accounts
5
+ # for any page rotation that is in place.
6
+ #
7
+ # OrientationDetector.new(:MediaBox => [0,0,612,792]).orientation
8
+ # => "portrait"
9
+ #
10
+ class OrientationDetector
11
+ def initialize(attributes)
12
+ @attributes = attributes
13
+ end
14
+
15
+ def orientation
16
+ @orientation ||= detect_orientation
17
+ end
18
+
19
+ private
20
+
21
+ def detect_orientation
22
+ llx,lly,urx,ury = @attributes[:MediaBox]
23
+ rotation = @attributes[:Rotate].to_i
24
+ width = urx.to_i - llx.to_i
25
+ height = ury.to_i - lly.to_i
26
+ if width > height
27
+ [0,180].include?(rotation) ? 'landscape' : 'portrait'
28
+ else
29
+ [0,180].include?(rotation) ? 'portrait' : 'landscape'
30
+ end
31
+ end
32
+ end
33
+ end
@@ -67,6 +67,12 @@ module PDF
67
67
  @attributes
68
68
  end
69
69
 
70
+ # Convenience method to identify the page's orientation.
71
+ #
72
+ def orientation
73
+ OrientationDetector.new(attributes).orientation
74
+ end
75
+
70
76
  # returns the plain text content of this page encoded as UTF-8. Any
71
77
  # characters that can't be translated will be returned as a ▯
72
78
  #
@@ -45,6 +45,9 @@ class PDF::Reader
45
45
  #
46
46
  def interesting_rows(rows)
47
47
  line_lengths = rows.map { |l| l.strip.length }
48
+
49
+ return [] if line_lengths.all?(&:zero?)
50
+
48
51
  first_line_with_text = line_lengths.index { |l| l > 0 }
49
52
  last_line_with_text = line_lengths.size - line_lengths.reverse.index { |l| l > 0 }
50
53
  interesting_line_count = last_line_with_text - first_line_with_text
@@ -42,7 +42,7 @@ module PDF
42
42
  @state = PageState.new(page)
43
43
  @content = []
44
44
  @characters = []
45
- @mediabox = page.attributes[:MediaBox]
45
+ @mediabox = page.objects.deref(page.attributes[:MediaBox])
46
46
  end
47
47
 
48
48
  def content
@@ -63,7 +63,7 @@ class PDF::Reader
63
63
 
64
64
  @encryptMeta = enc.has_key?(:EncryptMetadata)? enc[:EncryptMetadata].to_s == "true" : true;
65
65
 
66
- @file_id = file_id.first
66
+ @file_id = (file_id || []).first || ""
67
67
 
68
68
  @encrypt_key = build_standard_key(password)
69
69
  end
@@ -3,56 +3,6 @@
3
3
  require 'afm'
4
4
  require 'pdf/reader/synchronized_cache'
5
5
 
6
- # monkey patch the afm gem to give us access to the metrics by glyph code. I've
7
- # got a pull request to upstream so hopefully this can be removed soon. See
8
- # https://github.com/halfbyte/afm/pull/3
9
- class AFM::Font
10
- attr_reader :char_metrics_by_code
11
-
12
- # Loading a Font Metrics file by absolute path (no automatic font path resolution)
13
- def initialize(filename)
14
- @metadata = {}
15
- @char_metrics = {}
16
- @char_metrics_by_code = {}
17
- @kern_pairs = []
18
- File.open(filename) do |file|
19
- mode = :meta
20
- file.each_line do |line|
21
- case(line)
22
- when /^StartFontMetrics/ ; mode = :meta
23
- when /^StartCharMetrics/ ; mode = :char_metrics
24
- when /^EndCharMetrics/ ; mode = :meta
25
- when /^StartKernData/ ; mode = :kern_data
26
- when /^StartKernPairs/ ; mode = :kern_pairs
27
- when /^EndKernPairs/ ; mode = :kern_data
28
- when /^EndKernData/ ; mode = :meta
29
- else
30
- case(mode)
31
- when :meta
32
- if match = line.match(/^([\w]+) (.*)$/)
33
- @metadata[match[1]] = match[2]
34
- end
35
- when :char_metrics
36
- metrics = {}
37
- metrics[:charcode] = match[1].to_i if match = line.match(/C (-?\d+) *?;/)
38
- metrics[:wx] = match[1].to_i if match = line.match(/WX (-?\d+) *?;/)
39
- metrics[:name] = match[1] if match = line.match(/N ([.\w]+) *?;/)
40
- if match = line.match(/B (-?\d+) (-?\d+) (-?\d+) (-?\d+) *?;/)
41
- metrics[:boundingbox] = [match[1].to_i, match[2].to_i, match[3].to_i, match[4].to_i]
42
- end
43
- @char_metrics[metrics[:name]] = metrics if metrics[:name]
44
- @char_metrics_by_code[metrics[:charcode]] = metrics if metrics[:charcode] && metrics[:charcode] > 0
45
- when :kern_pairs
46
- if match = line.match(/^KPX ([.\w]+) ([.\w]+) (-?\d+)$/)
47
- @kern_pairs << [match[1], match[2], match[3].to_i]
48
- end
49
- end
50
- end
51
- end
52
- end
53
- end
54
- end
55
-
56
6
  class PDF::Reader
57
7
  module WidthCalculator
58
8
 
@@ -89,11 +39,19 @@ class PDF::Reader
89
39
  m[:wx]
90
40
  elsif @font.widths[code_point - 1]
91
41
  @font.widths[code_point - 1]
42
+ elsif control_character?(code_point)
43
+ 0
92
44
  else
93
- raise ArgumentError, "Unknown glyph width for #{code_point} #{@font.basefont}"
45
+ 0
94
46
  end
95
47
  end
96
48
 
49
+ private
50
+
51
+ def control_character?(code_point)
52
+ @font.encoding.int_to_name(code_point).first.to_s[/\Acontrol..\Z/]
53
+ end
54
+
97
55
  end
98
56
  end
99
57
  end
@@ -43,7 +43,7 @@ class PDF::Reader
43
43
  # with-in a program inside the font descriptor, however the widths
44
44
  # may not be in standard PDF glyph widths (1000 units => 1 text space unit)
45
45
  # so this width will need to be scaled
46
- w = @font.font_descriptor.find_glyph_width(code_point)
46
+ w = @font.font_descriptor.glyph_width(code_point)
47
47
  if w
48
48
  w.to_f * @font.font_descriptor.glyph_to_pdf_scale_factor
49
49
  else
metadata CHANGED
@@ -1,183 +1,183 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pdf-reader
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.3
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Healy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-07 00:00:00.000000000 Z
11
+ date: 2016-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '2.3'
33
+ version: '3.4'
34
34
  type: :development
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: '2.3'
40
+ version: '3.4'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: ZenTest
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: 4.4.2
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 4.4.2
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: cane
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 2.2.3
61
+ version: '2.6'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 2.2.3
68
+ version: '2.6'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: morecane
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: ir_b
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rdoc
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: Ascii85
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ~>
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
117
  version: 1.0.0
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ~>
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: 1.0.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: ruby-rc4
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - '>='
129
+ - - ">="
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - '>='
136
+ - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: hashery
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ~>
143
+ - - "~>"
144
144
  - !ruby/object:Gem::Version
145
145
  version: '2.0'
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ~>
150
+ - - "~>"
151
151
  - !ruby/object:Gem::Version
152
152
  version: '2.0'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: ttfunk
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - '>='
157
+ - - ">="
158
158
  - !ruby/object:Gem::Version
159
159
  version: '0'
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - '>='
164
+ - - ">="
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: afm
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - ~>
171
+ - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: 0.2.0
173
+ version: 0.2.1
174
174
  type: :runtime
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - ~>
178
+ - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: 0.2.0
180
+ version: 0.2.1
181
181
  description: The PDF::Reader library implements a PDF parser conforming as much as
182
182
  possible to the PDF specification from Adobe
183
183
  email:
@@ -194,99 +194,101 @@ extra_rdoc_files:
194
194
  - CHANGELOG
195
195
  - MIT-LICENSE
196
196
  files:
197
- - examples/metadata.rb
197
+ - CHANGELOG
198
+ - MIT-LICENSE
199
+ - README.rdoc
200
+ - Rakefile
201
+ - TODO
202
+ - bin/pdf_callbacks
203
+ - bin/pdf_list_callbacks
204
+ - bin/pdf_object
205
+ - bin/pdf_text
198
206
  - examples/callbacks.rb
199
- - examples/rspec.rb
200
- - examples/page_count.rb
201
- - examples/version.rb
202
- - examples/hash.rb
203
- - examples/extract_fonts.rb
204
- - examples/text.rb
205
207
  - examples/extract_bates.rb
208
+ - examples/extract_fonts.rb
206
209
  - examples/extract_images.rb
210
+ - examples/hash.rb
211
+ - examples/metadata.rb
212
+ - examples/page_count.rb
213
+ - examples/rspec.rb
214
+ - examples/text.rb
215
+ - examples/version.rb
207
216
  - lib/pdf-reader.rb
208
- - lib/pdf/reader/error.rb
209
- - lib/pdf/reader/filter.rb
210
- - lib/pdf/reader/reference.rb
211
- - lib/pdf/reader/form_xobject.rb
212
- - lib/pdf/reader/metadata_strategy.rb
217
+ - lib/pdf/hash.rb
218
+ - lib/pdf/reader.rb
219
+ - lib/pdf/reader/abstract_strategy.rb
220
+ - lib/pdf/reader/afm/Courier-Bold.afm
221
+ - lib/pdf/reader/afm/Courier-BoldOblique.afm
222
+ - lib/pdf/reader/afm/Courier-Oblique.afm
223
+ - lib/pdf/reader/afm/Courier.afm
224
+ - lib/pdf/reader/afm/Helvetica-Bold.afm
225
+ - lib/pdf/reader/afm/Helvetica-BoldOblique.afm
226
+ - lib/pdf/reader/afm/Helvetica-Oblique.afm
227
+ - lib/pdf/reader/afm/Helvetica.afm
228
+ - lib/pdf/reader/afm/Symbol.afm
229
+ - lib/pdf/reader/afm/Times-Bold.afm
230
+ - lib/pdf/reader/afm/Times-BoldItalic.afm
231
+ - lib/pdf/reader/afm/Times-Italic.afm
232
+ - lib/pdf/reader/afm/Times-Roman.afm
233
+ - lib/pdf/reader/afm/ZapfDingbats.afm
213
234
  - lib/pdf/reader/buffer.rb
214
- - lib/pdf/reader/parser.rb
235
+ - lib/pdf/reader/cid_widths.rb
236
+ - lib/pdf/reader/cmap.rb
237
+ - lib/pdf/reader/encoding.rb
238
+ - lib/pdf/reader/encodings/mac_expert.txt
215
239
  - lib/pdf/reader/encodings/mac_roman.txt
240
+ - lib/pdf/reader/encodings/pdf_doc.txt
216
241
  - lib/pdf/reader/encodings/standard.txt
217
242
  - lib/pdf/reader/encodings/symbol.txt
218
- - lib/pdf/reader/encodings/pdf_doc.txt
219
- - lib/pdf/reader/encodings/zapf_dingbats.txt
220
- - lib/pdf/reader/encodings/mac_expert.txt
221
243
  - lib/pdf/reader/encodings/win_ansi.txt
222
- - lib/pdf/reader/cid_widths.rb
223
- - lib/pdf/reader/stream.rb
224
- - lib/pdf/reader/object_stream.rb
225
- - lib/pdf/reader/cmap.rb
226
- - lib/pdf/reader/font_descriptor.rb
227
- - lib/pdf/reader/standard_security_handler.rb
228
- - lib/pdf/reader/page.rb
229
- - lib/pdf/reader/token.rb
230
- - lib/pdf/reader/transformation_matrix.rb
244
+ - lib/pdf/reader/encodings/zapf_dingbats.txt
245
+ - lib/pdf/reader/error.rb
246
+ - lib/pdf/reader/filter.rb
247
+ - lib/pdf/reader/filter/ascii85.rb
248
+ - lib/pdf/reader/filter/ascii_hex.rb
249
+ - lib/pdf/reader/filter/depredict.rb
250
+ - lib/pdf/reader/filter/flate.rb
251
+ - lib/pdf/reader/filter/lzw.rb
252
+ - lib/pdf/reader/filter/null.rb
253
+ - lib/pdf/reader/filter/run_length.rb
231
254
  - lib/pdf/reader/font.rb
232
- - lib/pdf/reader/abstract_strategy.rb
255
+ - lib/pdf/reader/font_descriptor.rb
256
+ - lib/pdf/reader/form_xobject.rb
257
+ - lib/pdf/reader/glyph_hash.rb
258
+ - lib/pdf/reader/glyphlist.txt
259
+ - lib/pdf/reader/lzw.rb
260
+ - lib/pdf/reader/metadata_strategy.rb
233
261
  - lib/pdf/reader/object_cache.rb
234
- - lib/pdf/reader/register_receiver.rb
235
- - lib/pdf/reader/text_receiver.rb
236
- - lib/pdf/reader/synchronized_cache.rb
237
- - lib/pdf/reader/resource_methods.rb
262
+ - lib/pdf/reader/object_hash.rb
263
+ - lib/pdf/reader/object_stream.rb
264
+ - lib/pdf/reader/orientation_detector.rb
265
+ - lib/pdf/reader/page.rb
266
+ - lib/pdf/reader/page_layout.rb
238
267
  - lib/pdf/reader/page_state.rb
268
+ - lib/pdf/reader/page_text_receiver.rb
239
269
  - lib/pdf/reader/pages_strategy.rb
240
- - lib/pdf/reader/glyphlist.txt
270
+ - lib/pdf/reader/parser.rb
241
271
  - lib/pdf/reader/print_receiver.rb
242
- - lib/pdf/reader/glyph_hash.rb
272
+ - lib/pdf/reader/reference.rb
273
+ - lib/pdf/reader/register_receiver.rb
274
+ - lib/pdf/reader/resource_methods.rb
275
+ - lib/pdf/reader/standard_security_handler.rb
276
+ - lib/pdf/reader/stream.rb
277
+ - lib/pdf/reader/synchronized_cache.rb
278
+ - lib/pdf/reader/text_receiver.rb
243
279
  - lib/pdf/reader/text_run.rb
244
- - lib/pdf/reader/object_hash.rb
245
- - lib/pdf/reader/page_layout.rb
246
- - lib/pdf/reader/afm/Times-Bold.afm
247
- - lib/pdf/reader/afm/Courier-BoldOblique.afm
248
- - lib/pdf/reader/afm/Times-Italic.afm
249
- - lib/pdf/reader/afm/Helvetica.afm
250
- - lib/pdf/reader/afm/Courier-Bold.afm
251
- - lib/pdf/reader/afm/Times-Roman.afm
252
- - lib/pdf/reader/afm/Helvetica-Bold.afm
253
- - lib/pdf/reader/afm/Helvetica-Oblique.afm
254
- - lib/pdf/reader/afm/Courier-Oblique.afm
255
- - lib/pdf/reader/afm/ZapfDingbats.afm
256
- - lib/pdf/reader/afm/Helvetica-BoldOblique.afm
257
- - lib/pdf/reader/afm/Courier.afm
258
- - lib/pdf/reader/afm/Times-BoldItalic.afm
259
- - lib/pdf/reader/afm/Symbol.afm
260
- - lib/pdf/reader/encoding.rb
280
+ - lib/pdf/reader/token.rb
281
+ - lib/pdf/reader/transformation_matrix.rb
261
282
  - lib/pdf/reader/width_calculator.rb
262
- - lib/pdf/reader/xref.rb
263
- - lib/pdf/reader/filter/flate.rb
264
- - lib/pdf/reader/filter/depredict.rb
265
- - lib/pdf/reader/filter/null.rb
266
- - lib/pdf/reader/filter/ascii_hex.rb
267
- - lib/pdf/reader/filter/ascii85.rb
268
- - lib/pdf/reader/filter/run_length.rb
269
- - lib/pdf/reader/filter/lzw.rb
270
283
  - lib/pdf/reader/width_calculator/built_in.rb
271
- - lib/pdf/reader/width_calculator/true_type.rb
272
284
  - lib/pdf/reader/width_calculator/composite.rb
273
- - lib/pdf/reader/width_calculator/type_zero.rb
285
+ - lib/pdf/reader/width_calculator/true_type.rb
274
286
  - lib/pdf/reader/width_calculator/type_one_or_three.rb
275
- - lib/pdf/reader/page_text_receiver.rb
276
- - lib/pdf/reader/lzw.rb
277
- - lib/pdf/hash.rb
278
- - lib/pdf/reader.rb
279
- - Rakefile
280
- - README.rdoc
281
- - TODO
282
- - CHANGELOG
283
- - MIT-LICENSE
284
- - bin/pdf_object
285
- - bin/pdf_text
286
- - bin/pdf_list_callbacks
287
- - bin/pdf_callbacks
287
+ - lib/pdf/reader/width_calculator/type_zero.rb
288
+ - lib/pdf/reader/xref.rb
288
289
  homepage: http://github.com/yob/pdf-reader
289
- licenses: []
290
+ licenses:
291
+ - MIT
290
292
  metadata: {}
291
293
  post_install_message: |2+
292
294
 
@@ -304,26 +306,26 @@ post_install_message: |2+
304
306
  ********************************************
305
307
 
306
308
  rdoc_options:
307
- - --title
309
+ - "--title"
308
310
  - PDF::Reader Documentation
309
- - --main
311
+ - "--main"
310
312
  - README.rdoc
311
- - -q
313
+ - "-q"
312
314
  require_paths:
313
315
  - lib
314
316
  required_ruby_version: !ruby/object:Gem::Requirement
315
317
  requirements:
316
- - - '>='
318
+ - - ">="
317
319
  - !ruby/object:Gem::Version
318
- version: 1.8.7
320
+ version: 1.9.3
319
321
  required_rubygems_version: !ruby/object:Gem::Requirement
320
322
  requirements:
321
- - - '>='
323
+ - - ">="
322
324
  - !ruby/object:Gem::Version
323
325
  version: '0'
324
326
  requirements: []
325
327
  rubyforge_project:
326
- rubygems_version: 2.0.0
328
+ rubygems_version: 2.5.1
327
329
  signing_key:
328
330
  specification_version: 4
329
331
  summary: A library for accessing the content of PDF files