Skip to content

Commit 479f5a6

Browse files
committed
Incorporate pdf library use iText5
1 parent 1dd11b7 commit 479f5a6

6 files changed

Lines changed: 703 additions & 1 deletion

File tree

Rakefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ end
1919

2020
desc 'Install'
2121
task :install do
22+
sh "mvn dependency:copy"
2223
FileUtils.mv "target/picrate-#{PiCrate::VERSION}.jar", 'lib'
2324
end
2425

library/pdf/pdf.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# frozen_string_literal: true
2+
3+
# @TODO usage
4+
class Processing::App
5+
java_import Java::ProcessingPdf::PGraphicsPDF
6+
end

picrate.gemspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Gem::Specification.new do |gem|
2727
gem.files << 'lib/jogl-all-natives-linux-amd64.jar'
2828
gem.files << 'lib/jogl-all-natives-linux-armv6hf.jar'
2929
gem.files << 'lib/jogl-all-natives-linux-aarch64.jar'
30+
gem.files << 'lib/itextpdf-5.5.13.2.jar'
3031
gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
3132
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
3233
gem.add_development_dependency 'minitest', '~> 5.10'

pom.rb

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
issue_management 'https://github.com/ruby-processing/PiCrate/issues', 'Github'
2525
# Need to update to jogl 2.4.1 as soon as available, then make a dependency
2626
properties('jogl.version' => '2.3.2',
27+
'itextpdf.version' => '5.5.13.2',
2728
'jruby.api' => 'http://jruby.org/apidocs/',
2829
'source.directory' => 'src',
2930
'processing.api' => 'http://processing.github.io/processing-javadocs/core/',
@@ -35,11 +36,23 @@
3536
jar 'org.jogamp.jogl:jogl-all:${jogl.version}'
3637
jar 'org.jogamp.gluegen:gluegen-rt-main:${jogl.version}'
3738
jar 'org.processing:video:3.0.2'
39+
jar 'com.itextpdf:itextpdf:${itextpdf.version}'
3840
end
3941

4042
overrides do
4143
plugin :resources, '3.1.0'
42-
plugin :dependency, '3.1.2'
44+
plugin :dependency, '3.1.2' do
45+
execute_goals( id: 'default-cli',
46+
artifactItems:[
47+
{ groupId: 'com.itextpdf',
48+
artifactId: 'itextpdf',
49+
version: '${itextpdf.version}',
50+
type: 'jar',
51+
outputDirectory: '${picrate.basedir}/lib'
52+
}
53+
]
54+
)
55+
end
4356
plugin(:compiler, '3.8.1',
4457
'release' => '11')
4558
plugin(:javadoc, '2.10.4',

pom.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ DO NOT MODIFY - GENERATED CODE
6464
<url>https://github.com/ruby-processing/PiCrate/issues</url>
6565
</issueManagement>
6666
<properties>
67+
<itextpdf.version>5.5.13.2</itextpdf.version>
6768
<jogl.version>2.3.2</jogl.version>
6869
<jruby.api>http://jruby.org/apidocs/</jruby.api>
6970
<picrate.basedir>${project.basedir}</picrate.basedir>
@@ -94,6 +95,11 @@ DO NOT MODIFY - GENERATED CODE
9495
<artifactId>video</artifactId>
9596
<version>3.0.2</version>
9697
</dependency>
98+
<dependency>
99+
<groupId>com.itextpdf</groupId>
100+
<artifactId>itextpdf</artifactId>
101+
<version>${itextpdf.version}</version>
102+
</dependency>
97103
</dependencies>
98104
<build>
99105
<resources>
@@ -124,6 +130,22 @@ DO NOT MODIFY - GENERATED CODE
124130
<plugin>
125131
<artifactId>maven-dependency-plugin</artifactId>
126132
<version>3.1.2</version>
133+
<executions>
134+
<execution>
135+
<id>default-cli</id>
136+
<configuration>
137+
<artifactItems>
138+
<artifactItem>
139+
<groupId>com.itextpdf</groupId>
140+
<artifactId>itextpdf</artifactId>
141+
<version>${itextpdf.version}</version>
142+
<type>jar</type>
143+
<outputDirectory>${picrate.basedir}/lib</outputDirectory>
144+
</artifactItem>
145+
</artifactItems>
146+
</configuration>
147+
</execution>
148+
</executions>
127149
</plugin>
128150
<plugin>
129151
<artifactId>maven-compiler-plugin</artifactId>

0 commit comments

Comments
 (0)