The latest samples for PDF4Java are available on GitHub here: https://github.com/o2solutions/pdf4java
The PDF4Java online documentation (class reference) is available here: https://o2sol.com/pdf4java/help/pdf4java/pdf4java.html
The PDF4Java.Render online documentation (class reference) is available here: https://o2sol.com/pdf4java/help/pdf4java.render/pdf4java.render.html
How to use the PDF4Java library from command line:
1. Specify the path to library's jar file when compiling the source code (x.y.z.w is the version number of the jar file):
javac -cp .;/path/to/PDF4Java-x.y.z.w.jar Application.java
2. Specify the path to library's jar file when running the aplication (x.y.z.w is the version number of the jar file):
java.exe -Djava.library.path=/path/to/library/ -classpath .;/path/to/library/PDF4Java-x.y.z.w.jar Application
How to use the PDF4Java library with Maven:
1. Install the library to local Maven repository (x.y.z.w is the version number of the jar file, ^ is for splitting a command line on multiple lines on Windows, on Linux use \ instead):
mvn install:install-file ^
-Dfile=/path/to/library/PDF4Java-x.y.z.w.jar ^
-DgroupId=com.o2sol ^
-DartifactId=pdf4java ^
-Dversion=x.y.z.w ^
-Dpackaging=jar ^
-DgeneratePom=true
mvn install:install-file ^
-Dfile=/path/to/library/PDF4Java.Cmaps-x.y.z.w.jar ^
-DgroupId=com.o2sol ^
-DartifactId=pdf4java.cmaps ^
-Dversion=x.y.z.w ^
-Dpackaging=jar ^
-DgeneratePom=true
mvn install:install-file ^
-Dfile=/path/to/library/PDF4Java.Render-x.y.z.w.jar ^
-DgroupId=com.o2sol ^
-DartifactId=pdf4java.render ^
-Dversion=x.y.z.w ^
-Dpackaging=jar ^
-DgeneratePom=true
2. Add the PDF4Java library to pom.xml (x.y.z.w is the version number of the jar file):
<dependencies>
<dependency>
<groupId>com.o2sol</groupId>
<artifactId>pdf4java</artifactId>
<version>x.y.z.w</version>
</dependency>
<dependency>
<groupId>com.o2sol</groupId>
<artifactId>pdf4java.cmaps</artifactId>
<version>x.y.z.w</version>
</dependency>
<dependency>
<groupId>com.o2sol</groupId>
<artifactId>pdf4java.render</artifactId>
<version>x.y.z.w</version>
</dependency>
</dependencies>
|