pdfbeads 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ChangeLog +4 -0
- data/lib/pdfbeads/pdfbuilder.rb +2 -2
- data/lib/pdfbeads/pdflabels.rb +1 -1
- data/lib/pdfbeads/pdfpage.rb +11 -2
- metadata +4 -4
data/ChangeLog
CHANGED
data/lib/pdfbeads/pdfbuilder.rb
CHANGED
@@ -582,10 +582,10 @@ class PDFBeads::PDFBuilder
|
|
582
582
|
|
583
583
|
def loadJBIG2Page( path,dictpath,ocref )
|
584
584
|
begin
|
585
|
-
jbig2 = File.open( path,'
|
585
|
+
jbig2 = File.open( path,'rb' ).read
|
586
586
|
width, height, xres, yres = jbig2[11...27].unpack( 'NNNN' )
|
587
587
|
unless @dictpath.eql? dictpath
|
588
|
-
symd_f = File.open( dictpath,'
|
588
|
+
symd_f = File.open( dictpath,'rb' ).read
|
589
589
|
symd_o = @doc.addObject( XObj.new(Hash.new(),symd_f) )
|
590
590
|
@dictpath = dictpath
|
591
591
|
@dictobj = symd_o
|
data/lib/pdfbeads/pdflabels.rb
CHANGED
@@ -69,7 +69,7 @@ class PDFBeads::PDFBuilder::PDFLabels < Array
|
|
69
69
|
fields = descr.split(/:/, 2)
|
70
70
|
if /\d+/.match( fields[0] )
|
71
71
|
rng[:first] = fields[0].to_i
|
72
|
-
if fields.length > 1 and /([
|
72
|
+
if fields.length > 1 and /([^%]*)%?(\d*)([DRrAa]?)/.match(fields[1])
|
73
73
|
rng[:prefix] = $1 unless $1 == ''
|
74
74
|
rng[:start ] = $2.to_i unless $2 == ''
|
75
75
|
rng[:style ] = $3 unless $3 == ''
|
data/lib/pdfbeads/pdfpage.rb
CHANGED
@@ -409,8 +409,17 @@ class PDFBeads::PageDataProvider < Array
|
|
409
409
|
force = @pageargs[:force_update]
|
410
410
|
|
411
411
|
has_jbig2 = false
|
412
|
-
|
413
|
-
|
412
|
+
if /(win|w)32$/i.match( RUBY_PLATFORM )
|
413
|
+
schar = ';'
|
414
|
+
ext = '.exe'
|
415
|
+
sep = '\\'
|
416
|
+
else
|
417
|
+
schar = ':'
|
418
|
+
ext = ''
|
419
|
+
sep = '/'
|
420
|
+
end
|
421
|
+
ENV['PATH'].split( schar ).each do |dir|
|
422
|
+
if File.exists?( dir << sep << 'jbig2' << ext )
|
414
423
|
has_jbig2 = true
|
415
424
|
break
|
416
425
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pdfbeads
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 1
|
10
|
+
version: 1.0.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Alexey Kryukov
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-11-
|
18
|
+
date: 2010-11-12 00:00:00 +03:00
|
19
19
|
default_executable: pdfbeads
|
20
20
|
dependencies: []
|
21
21
|
|