Some test text!

platform
search

PDFTron for Java

Contents

Running sample projects
Creating your app

linkRunning sample projects

  1. Install the Java JDK: JDK 8 Download
  2. Make sure that the JDK is available in your path environment variable.
  3. Download the PDFTron SDK
  4. Navigate into a sample project, for example /Samples/AddImageTest/JAVA
  5. Compile the Java code using the following command:
javac -cp .;../../../Lib/PDFNet.jar AddImageTest.java
  1. Run the app using the following command:
java.exe -Djava.library.path=../../../Lib -classpath .;../../../Lib/PDFNet.jar AddImageTest

linkCreating your app

  1. Install the Java JDK: JDK 8 Download
  2. Make sure that the JDK is available in your path environment variable.
  3. Download the PDFTron SDK
  4. Create a directory called 'Hello', under the Samples directory. Create a new java code file, in the 'Samples/Hello' directory, and open it using your favourite editor. Name it Hello.java.
  5. Open Hello.java in your favorite text editor, add:
import java.io.File;
import java.io.IOException;

import com.pdftron.common.PDFNetException;
import com.pdftron.pdf.*;

public class Hello
{
    public static void main(String[] args)
    {
            PDFNet.initialize();
            System.out.println("Hello World!");
    }
}
  1. Compile the project.
javac -cp .;../../Lib/PDFNet.jar Hello.java
  1. Run the project:
java.exe -Djava.library.path=../../Lib -classpath .;../../Lib/PDFNet.jar Hello

Now you have made a Java project with PDFTron SDK!

PDFNet is running in demo mode.
Hello World!

Get the anwsers you need: Support

Contents

Running sample projects
Creating your app