pdf-reader 2.9.0 → 2.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +4 -0
- data/lib/pdf/reader/filter.rb +9 -10
- data/lib/pdf/reader/parser.rb +11 -2
- data/lib/pdf/reader/validating_receiver.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07c734cf3cfc0abf1102f813976d4936d33b57815f114ce92224bbd605fe16a2
|
4
|
+
data.tar.gz: f52b1751f83717a7bc96c56e8d830559d387fb430cfa6fa2a78604d98c7476f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72fda8f6b32c20782adca6cca44d291c7cbe4ac9d858da5ed1c815af2a7d6680e3906cac47a8414923c8db639fd51365d9da8612c1c7f79a674b22448bb35cae
|
7
|
+
data.tar.gz: fa79a29d80a36d37e1188769bf7991d5108bbe08b11711a7c9bb1741cedd3682b77afe219a24ae7844fdbf10b23ca3eb5434f4b9418d7002f07fb8edf9dd6e26
|
data/CHANGELOG
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
v2.9.1 (4th February 2022)
|
2
|
+
- Fix exception in Page#walk introduced in 2.9.0 (http://github.com/yob/pdf-reader/pull/442)
|
3
|
+
- Other small bug fixes
|
4
|
+
|
1
5
|
v2.9.0 (24th January 2022)
|
2
6
|
- Support additional encryption standards (http://github.com/yob/pdf-reader/pull/419)
|
3
7
|
- Return CropBox correctly from Page#rectangles (https://github.com/yob/pdf-reader/pull/420)
|
data/lib/pdf/reader/filter.rb
CHANGED
@@ -43,16 +43,15 @@ class PDF::Reader
|
|
43
43
|
#
|
44
44
|
def self.with(name, options = {})
|
45
45
|
case name
|
46
|
-
when :ASCII85Decode then PDF::Reader::Filter::Ascii85.new(options)
|
47
|
-
when :ASCIIHexDecode then PDF::Reader::Filter::AsciiHex.new(options)
|
48
|
-
when :CCITTFaxDecode then PDF::Reader::Filter::Null.new(options)
|
49
|
-
when :DCTDecode then PDF::Reader::Filter::Null.new(options)
|
50
|
-
when :FlateDecode
|
51
|
-
when :
|
52
|
-
when :
|
53
|
-
when :
|
54
|
-
when :
|
55
|
-
when :RunLengthDecode then PDF::Reader::Filter::RunLength.new(options)
|
46
|
+
when :ASCII85Decode, :A85 then PDF::Reader::Filter::Ascii85.new(options)
|
47
|
+
when :ASCIIHexDecode, :AHx then PDF::Reader::Filter::AsciiHex.new(options)
|
48
|
+
when :CCITTFaxDecode, :CCF then PDF::Reader::Filter::Null.new(options)
|
49
|
+
when :DCTDecode, :DCT then PDF::Reader::Filter::Null.new(options)
|
50
|
+
when :FlateDecode, :Fl then PDF::Reader::Filter::Flate.new(options)
|
51
|
+
when :JBIG2Decode then PDF::Reader::Filter::Null.new(options)
|
52
|
+
when :JPXDecode then PDF::Reader::Filter::Null.new(options)
|
53
|
+
when :LZWDecode, :LZW then PDF::Reader::Filter::Lzw.new(options)
|
54
|
+
when :RunLengthDecode, :RL then PDF::Reader::Filter::RunLength.new(options)
|
56
55
|
else
|
57
56
|
raise UnsupportedFeatureError, "Unknown filter: #{name}"
|
58
57
|
end
|
data/lib/pdf/reader/parser.rb
CHANGED
@@ -96,7 +96,13 @@ class PDF::Reader
|
|
96
96
|
# id - the object ID to return
|
97
97
|
# gen - the object revision number to return
|
98
98
|
def object(id, gen)
|
99
|
-
|
99
|
+
idCheck = parse_token
|
100
|
+
|
101
|
+
# Sometimes the xref table is corrupt and points to an offset slightly too early in the file.
|
102
|
+
# check the next token, maybe we can find the start of the object we're looking for
|
103
|
+
if idCheck != id
|
104
|
+
Error.assert_equal(parse_token, id)
|
105
|
+
end
|
100
106
|
Error.assert_equal(parse_token, gen)
|
101
107
|
Error.str_assert(parse_token, "obj")
|
102
108
|
|
@@ -222,7 +228,10 @@ class PDF::Reader
|
|
222
228
|
data = @buffer.read(length, :skip_eol => true)
|
223
229
|
|
224
230
|
Error.str_assert(parse_token, "endstream")
|
225
|
-
|
231
|
+
|
232
|
+
# We used to assert that the stream had the correct closing token, but it doesn't *really*
|
233
|
+
# matter if it's missing, and other readers seems to handle its absence just fine
|
234
|
+
# Error.str_assert(parse_token, "endobj")
|
226
235
|
|
227
236
|
PDF::Reader::Stream.new(dict, data)
|
228
237
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pdf-reader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.9.
|
4
|
+
version: 2.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Healy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -288,9 +288,9 @@ licenses:
|
|
288
288
|
- MIT
|
289
289
|
metadata:
|
290
290
|
bug_tracker_uri: https://github.com/yob/pdf-reader/issues
|
291
|
-
changelog_uri: https://github.com/yob/pdf-reader/blob/v2.9.
|
292
|
-
documentation_uri: https://www.rubydoc.info/gems/pdf-reader/2.9.
|
293
|
-
source_code_uri: https://github.com/yob/pdf-reader/tree/v2.9.
|
291
|
+
changelog_uri: https://github.com/yob/pdf-reader/blob/v2.9.1/CHANGELOG
|
292
|
+
documentation_uri: https://www.rubydoc.info/gems/pdf-reader/2.9.1
|
293
|
+
source_code_uri: https://github.com/yob/pdf-reader/tree/v2.9.1
|
294
294
|
post_install_message:
|
295
295
|
rdoc_options:
|
296
296
|
- "--title"
|
@@ -311,7 +311,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
311
311
|
- !ruby/object:Gem::Version
|
312
312
|
version: '0'
|
313
313
|
requirements: []
|
314
|
-
rubygems_version: 3.
|
314
|
+
rubygems_version: 3.2.32
|
315
315
|
signing_key:
|
316
316
|
specification_version: 4
|
317
317
|
summary: A library for accessing the content of PDF files
|