prawn-print 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/prawn-print/js.rb +11 -3
- data/lib/prawn-print/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7cb41742ce17c84ee133ae177fcd33a2f54a026
|
4
|
+
data.tar.gz: 2fc20d5356396b904aa1a44d85f2208b968741b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 580e73c2a36573b6552f307b9d8187b94691d74810ce72729dc951b0581fae5de294e5a1a0e7077dc75dd051995f77ba16bc94fd8f773f49aac6e0ac06d4d066
|
7
|
+
data.tar.gz: 11b7f9f0133306c0afbda128e2c09c6696f951cf0d80c009f5dc0fba4559c92894557ac5fe7d9b12dcf6a6365a274f38c7e80eb272cc4c9882feabb2b86ae98b
|
data/lib/prawn-print/js.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
# From https://github.com/
|
2
|
-
# by James Healy
|
1
|
+
# From https://github.com/jlee42/prawn-js/blob/master/lib/prawn/js.rb
|
2
|
+
# by James Healy, Karl Smith and Jeffrey Lee under the MIT license.
|
3
3
|
|
4
4
|
module Prawn
|
5
5
|
module Print
|
@@ -24,7 +24,15 @@ module Prawn
|
|
24
24
|
# See section 3.6.3 and table 3.28 in the PDF spec.
|
25
25
|
#
|
26
26
|
def javascript
|
27
|
-
|
27
|
+
if defined? Prawn::NameTree
|
28
|
+
names.data[:JavaScript] ||= ref!(Prawn::NameTree::Node.new(self, NAME_TREE_CHILDREN_LIMIT))
|
29
|
+
elsif defined? Prawn::Core
|
30
|
+
names.data[:JavaScript] ||= ref!(Prawn::Core::NameTree::Node.new(self, NAME_TREE_CHILDREN_LIMIT))
|
31
|
+
elsif defined? PDF::Core::NameTree
|
32
|
+
names.data[:JavaScript] ||= ref!(PDF::Core::NameTree::Node.new(self, NAME_TREE_CHILDREN_LIMIT))
|
33
|
+
else
|
34
|
+
raise "Can't find Prawn's NameTree!"
|
35
|
+
end
|
28
36
|
end
|
29
37
|
|
30
38
|
end
|
data/lib/prawn-print/version.rb
CHANGED