itext-jruby 0.0.8 → 0.0.9
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/README.rdoc +4 -0
- data/VERSION +1 -1
- data/itext-jruby.gemspec +2 -2
- data/lib/itext-jruby.rb +37 -19
- data/lib/itext.rb +1 -0
- metadata +2 -2
data/README.rdoc
CHANGED
@@ -29,6 +29,10 @@ Find more examples in test directory.
|
|
29
29
|
* 0.0.6 - First stable version allowing adding attachments to PdfFile
|
30
30
|
* 0.0.7 - Add option to sign documents usign pkcs12 certificates
|
31
31
|
* 0.0.8 - Minor fixes
|
32
|
+
* 0.0.9 - Load jars only if required
|
33
|
+
|
34
|
+
== Known issues
|
35
|
+
* Problem with TorqueBox stack - https://issues.jboss.org/browse/TORQUE-1164
|
32
36
|
|
33
37
|
== Read more
|
34
38
|
* Creating pkcs12 certs: http://www.flatmtn.com/article/creating-pkcs12-certificates
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.9
|
data/itext-jruby.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "itext-jruby"
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.9"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Ernest Bursa"]
|
12
|
-
s.date = "2013-10-
|
12
|
+
s.date = "2013-10-20"
|
13
13
|
s.description = "IText"
|
14
14
|
s.email = "ernest@bzdury.pl"
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/itext-jruby.rb
CHANGED
@@ -1,24 +1,42 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
require 'java'
|
3
|
-
Dir[File.expand_path(File.join(File.dirname(__FILE__), "../libexec/jar/*.jar"))].each { |jar| require jar }
|
4
3
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
4
|
+
class Itext
|
5
|
+
|
6
|
+
# Import all required jars and packages
|
7
|
+
def self.import_java(notify = false)
|
8
|
+
Dir[File.expand_path(File.join(File.dirname(__FILE__), "../libexec/jar/*.jar"))].each { |jar| require jar }
|
9
|
+
|
10
|
+
libs = [
|
11
|
+
java.io.ByteArrayOutputStream,
|
12
|
+
com.lowagie.text.html.WebColors,
|
13
|
+
com.lowagie.text.Document,
|
14
|
+
com.lowagie.text.Paragraph,
|
15
|
+
com.lowagie.text.Phrase,
|
16
|
+
com.lowagie.text.PageSize,
|
17
|
+
com.lowagie.text.Chunk,
|
18
|
+
com.lowagie.text.pdf.PdfPCell,
|
19
|
+
com.lowagie.text.pdf.PdfPTable,
|
20
|
+
com.lowagie.text.BadElementException,
|
21
|
+
com.lowagie.text.DocumentException,
|
22
|
+
com.lowagie.text.Image,
|
23
|
+
com.lowagie.text.pdf.PdfFileSpecification,
|
24
|
+
com.lowagie.text.pdf.PdfReader,
|
25
|
+
com.lowagie.text.pdf.PdfSignatureAppearance,
|
26
|
+
com.lowagie.text.pdf.PdfStamper,
|
27
|
+
com.lowagie.text.pdf.PdfWriter,
|
28
|
+
java.io.FileOutputStream
|
29
|
+
]
|
30
|
+
|
31
|
+
# Require lib only if package not found
|
32
|
+
libs.each do |lib|
|
33
|
+
unless defined?(lib)
|
34
|
+
java_import(lib)
|
35
|
+
else
|
36
|
+
puts "Java Import: Allready defined: #{lib}" if notify
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
23
41
|
|
24
42
|
require 'itext'
|
data/lib/itext.rb
CHANGED
metadata
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
name: itext-jruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.9
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Ernest Bursa
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-10-
|
12
|
+
date: 2013-10-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: shoulda
|