Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/javafx/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.4</version>
<version>0.0.8</version>
<configuration>
<mainClass>PdfFXViewer</mainClass>
</configuration>
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<module>core</module>
<module>viewer</module>
<module>examples</module>
<module>qa</module>
</modules>

<properties>
Expand Down
77 changes: 77 additions & 0 deletions qa/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.github.pcorless.icepdf</groupId>
<artifactId>icepdf</artifactId>
<version>7.3.0-SNAPSHOT</version>
</parent>
<artifactId>qa</artifactId>
<packaging>pom</packaging>
<name>ICEpdf :: QA</name>
<description>
The ICEpdf common QA rendering compare.
</description>

<modules>
<module>viewer-jfx</module>
</modules>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.8.6</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.8.6</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.12.7.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-io</artifactId>
<version>1.3.2</version>
</dependency>
<!-- Bouncy castle is need for building the core bundles as well as digital signature support -->
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk18on</artifactId>
<version>${bouncy.version}</version>
</dependency>

<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk18on</artifactId>
<version>${bouncy.version}</version>
</dependency>
<!-- tiff, JPEG2000 and jbig2 image support -->
<dependency>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio-tiff</artifactId>
<version>${twelve-monkey.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>jbig2-imageio</artifactId>
<version>${jbig2.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.github.jai-imageio</groupId>
<artifactId>jai-imageio-jpeg2000</artifactId>
<version>${jai-imageio.version}</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
</dependencies>
</dependencyManagement>

</project>
88 changes: 88 additions & 0 deletions qa/viewer-jfx/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.github.pcorless.icepdf</groupId>
<artifactId>qa</artifactId>
<version>7.3.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>qa-viewer</artifactId>
<packaging>jar</packaging>
<name>ICEpdf :: QA :: Viewer</name>

<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>21</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.17.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.17.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.17.0</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.14.0</version>
</dependency>
<!-- Bouncy castle is need for building the core bundles as well as digital signature support -->
<!-- <dependency>-->
<!-- <groupId>org.bouncycastle</groupId>-->
<!-- <artifactId>bcprov-jdk18on</artifactId>-->
<!-- <version>${bouncy.version}</version>-->
<!-- </dependency>-->

<!-- <dependency>-->
<!-- <groupId>org.bouncycastle</groupId>-->
<!-- <artifactId>bcpkix-jdk18on</artifactId>-->
<!-- <version>${bouncy.version}</version>-->
<!-- </dependency>-->
<!-- tiff, JPEG2000 and jbig2 image support -->
<!-- <dependency>-->
<!-- <groupId>com.twelvemonkeys.imageio</groupId>-->
<!-- <artifactId>imageio-tiff</artifactId>-->
<!-- <version>${twelve-monkey.version}</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.apache.pdfbox</groupId>-->
<!-- <artifactId>jbig2-imageio</artifactId>-->
<!-- <version>${jbig2.version}</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>com.github.jai-imageio</groupId>-->
<!-- <artifactId>jai-imageio-jpeg2000</artifactId>-->
<!-- <version>${jai-imageio.version}</version>-->
<!-- </dependency>-->
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3</version>
</plugin>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.8</version>
<configuration>
<mainClass>org.icepdf.qa.viewer.Launcher</mainClass>
</configuration>
</plugin>
</plugins>
</build>

</project>
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
include 'core:core-awt',
'core:core-fonts',
'viewer:viewer-awt',
'viewer:viewer-fx',
'qa:viewer-jfx',
'examples:annotation:callback',
'examples:annotation:creation',
Expand Down
2 changes: 1 addition & 1 deletion viewer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<modules>
<!--<module>viewer-core</module>-->
<module>viewer-awt</module>
<!--<module>viewer-fx</module>-->
<module>viewer-fx</module>
</modules>

<dependencyManagement>
Expand Down
4 changes: 2 additions & 2 deletions viewer/viewer-awt/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
id 'application'
}

description = 'ICEpdf viewer reference implementation project'
description = 'ICEpdf AWT viewer reference implementation project'

application {
mainClass = "org.icepdf.ri.viewer.Launcher"
Expand Down Expand Up @@ -44,7 +44,7 @@ publishing {
artifactId = 'icepdf-viewer'
version = "${VERSION + (RELEASE_TYPE?.trim() ? '-' + RELEASE_TYPE : '')}"
pom.withXml {
asNode().appendNode('description', 'ICEpdf core rendering library.')
asNode().appendNode('description', 'ICEpdf AWT viewer reference implementation.')
asNode().appendNode('url', 'https://github.com/pcorless/icepdf')
asNode().appendNode('scm')
.appendNode('connection', 'scm:git:https://github.com/pcorless/icepdf').parent()
Expand Down
4 changes: 4 additions & 0 deletions viewer/viewer-fx/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
mvn javafx:run -f ./viewer/viewer-fx/pom.xml

~/dev/git/icepdf/viewer/viewer-fx/build.gradle
gradle :viewer:viewer-fx:run
128 changes: 128 additions & 0 deletions viewer/viewer-fx/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
plugins {
id 'application'
id 'org.openjfx.javafxplugin' version '0.1.0'
}

// JavaFX 21 requires Java 17+, override parent toolchain for this module
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

repositories {
mavenCentral()
}

description = 'ICEpdf FX viewer reference implementation project'

application {
mainClass = "org.icepdf.fx.ri.viewer.Launcher"
applicationDefaultJvmArgs = ["-Xms64m", "-Xmx1024m"]
}

def sectionName = 'org/icepdf/fx/ri/viewer'
def baseJarName = 'icepdf'
def baseAppendixName = 'viewer-fx'
def commandlineArgs = '-loadfile "/home/pcorless/dev/pdf-qa/PDF32000_2008.pdf"'


javafx {
version = "21.0.5"
modules = [ 'javafx.base', 'javafx.controls', 'javafx.graphics', 'javafx.swing' ]
}


dependencies {
implementation project(':core:core-awt')
// signature validation.
implementation 'org.bouncycastle:bcprov-jdk18on:' + "${BOUNCY_VERSION}"
implementation 'org.bouncycastle:bcpkix-jdk18on:' + "${BOUNCY_VERSION}"
// drawing tests
implementation 'org.jfree:org.jfree.fxgraphics2d:2.1'
// tests
testImplementation(platform("org.junit:junit-bom:${JUNIT_BOM_VERSION}"))
testImplementation('org.junit.jupiter:junit-jupiter')
}

// generatePomFileForViewerJarPublication
publishing {
publications {
viewerJar(MavenPublication) {
from components.java
afterEvaluate {
groupId = 'org.icepdf.os'
artifactId = 'icepdf-viewer-fx'
version = "${VERSION + (RELEASE_TYPE?.trim() ? '-' + RELEASE_TYPE : '')}"
pom.withXml {
asNode().appendNode('description', 'ICEpdf JX Viewer reference implementation.')
asNode().appendNode('url', 'https://github.com/pcorless/icepdf')
asNode().appendNode('scm')
.appendNode('connection', 'scm:git:https://github.com/pcorless/icepdf').parent()
.appendNode('url', 'https://www.apache.org/licenses/LICENSE-2.0.txt').parent()
.appendNode('tag', 'icepdf-' + version + '-maven')
asNode().appendNode('licenses').appendNode('license')
.appendNode('name', 'Apache License, Version 2.0').parent()
.appendNode('url', 'https://www.apache.org/licenses/LICENSE-2.0.html').parent()
.appendNode('distribution', 'repo')
}
artifact sourcesJar
artifact javadocJar
}
}
}
}

test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}

jar {
archiveBaseName.set('icepdf')
archiveAppendix.set("viewer-fx")
archiveVersion.set("${VERSION}")
archiveClassifier.set("${RELEASE_TYPE}")

doFirst {
manifest {
attributes ('Created-By': System.getProperty('java.version') + ' (' + System.getProperty('java.vendor') + ')')
// executable jar
attributes("Main-Class": 'org.icepdf.ri.viewer.Launcher')
if (!configurations.runtimeClasspath.isEmpty()) {
attributes('Class-Path': configurations.runtimeClasspath.files.collect{it.name}.join(' '))
}
}
}

manifest {
// section names attributes
attributes("Implementation-Title": "${archiveBaseName.get() + '-' + archiveAppendix.get()}", "${sectionName}")
attributes("Implementation-Version": "${VERSION + (RELEASE_TYPE?.trim()? '-' + RELEASE_TYPE:'')}", "${sectionName}")
attributes("Implementation-Vendor": "${COMPANY}", "${sectionName}")
}
}

task sourcesJar(type: Jar, dependsOn: classes) {
description = 'Assembles a jar archive containing the main classes source code.'
group = 'Documentation'
archiveBaseName.set("${baseJarName}")
archiveAppendix.set("${baseAppendixName}")
archiveVersion.set("${VERSION}")
archiveClassifier.set("sources")
manifest {
attributes("Implementation-Title": "${archiveBaseName.get() + '-' + archiveAppendix.get()}", "${sectionName}")
attributes("Implementation-Version": "${VERSION + (RELEASE_TYPE?.trim()? '-' + RELEASE_TYPE:'')}", "${sectionName}")
attributes("Implementation-Vendor": "${COMPANY}", "${sectionName}")
}
from sourceSets.main.allSource
}

task javadocJar(type: Jar, dependsOn: 'javadoc') {
from javadoc
archiveClassifier.set("javadoc")
}

// Archives are now automatically included via publishing plugin
Loading