pdf-reader 0.7.4 → 0.7.5
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +5 -0
- data/Rakefile +1 -1
- data/lib/pdf/reader/parser.rb +10 -4
- metadata +2 -2
data/CHANGELOG
CHANGED
@@ -1,7 +1,12 @@
|
|
1
|
+
v0.7.5 (27th August 2008)
|
2
|
+
- Fix a 1.8.7ism
|
3
|
+
|
1
4
|
v0.7.4 (7th August 2008)
|
2
5
|
- Raise a MalformedPDFError if a content stream contains an unterminated string
|
3
6
|
- Fix an bug that was causing an endless loop on some OSX systems
|
4
7
|
- valid strings were incorrectly thought to be unterminated
|
8
|
+
- thanks to Jeff Webb for playing email ping pong with me as I tracked this
|
9
|
+
issue down
|
5
10
|
|
6
11
|
v0.7.3 (11th June 2008)
|
7
12
|
- Add a high level way to get direct access to a PDF object, including a new executable: pdf_object
|
data/Rakefile
CHANGED
data/lib/pdf/reader/parser.rb
CHANGED
@@ -121,10 +121,16 @@ class PDF::Reader
|
|
121
121
|
|
122
122
|
# find the first occurance of ( ) [ \ or ]
|
123
123
|
#
|
124
|
-
#
|
125
|
-
#
|
126
|
-
#
|
127
|
-
|
124
|
+
# I originally just used the regexp form of index(), but it seems to be
|
125
|
+
# buggy on some OSX systems (returns nil when there is a match). The
|
126
|
+
# block form of index() is more reliable, but only works on 1.8.7 or
|
127
|
+
# greater.
|
128
|
+
#
|
129
|
+
if RUBY_VERSION >= "1.8.7"
|
130
|
+
i = @buffer.raw.unpack("C*").index { |n| [40, 41, 91, 92, 93].include?(n) }
|
131
|
+
else
|
132
|
+
i = @buffer.raw.index(/[\\\(\)]/)
|
133
|
+
end
|
128
134
|
|
129
135
|
if i.nil?
|
130
136
|
str << @buffer.raw + "\n"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pdf-reader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Jones
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-08-
|
12
|
+
date: 2008-08-27 00:00:00 +10:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|