combine_pdf 1.0.12 → 1.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/combine_pdf/parser.rb +3 -2
- data/lib/combine_pdf/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ca8e3d75a2b167718e3f749076bd5bbbd1701b0218a811fd9fed4dda23c194a
|
4
|
+
data.tar.gz: 71bae00e5caeba7b1f70d2fc3492a669b5c05fcde8d56a9b58b7bbda2010cec9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c680801b7c0c925e1c6a66459b51de48ff3942c1cf24d5b31dbad55a2fb88f434ac4f67404c81ee422e672c92fc852ba4708835904c1d041cc5537abc13ba87
|
7
|
+
data.tar.gz: b2cb8a1eecf10d2503193f09802dc25655cd79b8bf41d422c1c45152fb0cf98e2092788bc19e77d139ec5918fa42782a5f97a2e1e9a7f9703de5be5b4479d2ca
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
***
|
4
4
|
|
5
|
+
#### Change log v.1.0.13
|
6
|
+
|
7
|
+
**Fix**: Fixed an issue related to PDF object streams (version 1.6) where a numerical object at the beginning of the stream might be mis-parsed as an object reference number rather than an object. Credit to @Defoncesko for reporting issue #141.
|
8
|
+
|
5
9
|
#### Change log v.1.0.12
|
6
10
|
|
7
11
|
**Fix**: Fixed an issue introduced in version 1.0.11, where a fragmented XREF table might cause the CombinePDF::Parser to fail. Credit to @solasdev for reporting issue #140.
|
data/lib/combine_pdf/parser.rb
CHANGED
@@ -112,12 +112,13 @@ module CombinePDF
|
|
112
112
|
next unless o.is_a?(Hash) && o[:Type] == :ObjStm
|
113
113
|
## un-encode (using the correct filter) the object streams
|
114
114
|
PDFFilter.inflate_object o
|
115
|
+
# puts "Object Stream Found:", o[:raw_stream_content]
|
115
116
|
## extract objects from stream
|
116
117
|
@scanner = StringScanner.new o[:raw_stream_content]
|
117
118
|
stream_data = _parse_
|
118
119
|
id_array = []
|
119
120
|
collection = [nil]
|
120
|
-
while stream_data[0].is_a? (Numeric)
|
121
|
+
while (stream_data[0].is_a?(Numeric) && stream_data[1].is_a?(Numeric))
|
121
122
|
id_array << stream_data.shift
|
122
123
|
stream_data.shift
|
123
124
|
end
|
@@ -478,7 +479,7 @@ module CombinePDF
|
|
478
479
|
##########################################
|
479
480
|
else
|
480
481
|
# always advance
|
481
|
-
warn "Advancing for unknown reason... #{@scanner.string[@scanner.pos - 4, 8]} ... #{@scanner.peek(4)}" unless @scanner.peek(1) =~ /[\s\n]/
|
482
|
+
# warn "Advancing for unknown reason... #{@scanner.string[@scanner.pos - 4, 8]} ... #{@scanner.peek(4)}" unless @scanner.peek(1) =~ /[\s\n]/
|
482
483
|
warn 'Warning: parser advancing for unknown reason. Potential data-loss.'
|
483
484
|
@scanner.pos = @scanner.pos + 1
|
484
485
|
end
|
data/lib/combine_pdf/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: combine_pdf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Boaz Segev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-rc4
|