This tutorial will help you installing iText on Windows. iText allows you to create PDF files from Java. A new and better tutorial on how to run iText with Eclipse is now available.
First, you need to install Java, which is an excellent object oriented programming language.
- Download the latests Java SE JDK version from the web site http://java.sun.com/.
- Follow the installer software instructions and install the Java
- TextPad (http://www.textpad.com/) is an excellent free Java editor you might want to use to create Java programs.
Next, you need to install iText.To create PDF files from a Java-editor, an extra package containing the necessary classes is made available: iText.jar. In order for the system software and thus all the Java-editors to recognize this extra package a few simple steps have to be taken to set a proper classpath. They are described and visualized below.
- Go to the web site http://www.lowagie.com/iText/.
- Go to ‘Downloads’ and save the file iText.jar to your hard disk.
- Place the file iText.jar in a folder that is easy to recall. Example: D:\java\iText\iText.jar
- Right-click ‘My Computer’ and select ‘Properties’ [Picture 1]
- Select tab page ‘Advanced’ [picture 2]
- Click the button ‘Environmental variables‘ [picture 3]
- Within ‘System variables‘ a new variable “CLASSPATH” (all capitals) has to be created if it isn’t there yet. [picture 4]
- The value of the variable “CLASSPATH” must contain the location of the iText.jar file. Example: “.;D:\java\text\iText.jar;” [picture 5]
- Select ‘OK’ three times to close down all the open windows.
- Open a Java-editor, such as TextPad, and load a tutorial Java-file (also available at the iText web site). Compile and run the Java source code to test if the installation is successful.
You should now be able to create PDF files from Java.