The successful Java developer requires extensive and accurate knowledge of the language and its APIs. A toolbox full of useful tools that help the developer solve problems in an efficient manner also contributes to success.
I have found three very useful open-source tools that have helped me with my Java career. Because I enjoy working with these tools and because I think they will also benefit your own Java career, I wrote this three-part series to introduce each tool. This article launches that series by focusing on iText.
Create PDF Documents with iText
Have you ever wanted to create Adobe PDF documents without having to spend money on PDF-creation software? (You can create five free PDF documents at Adobe's Web site, but you must pay a subscription fee to create documents beyond the first five.) Thanks to Java and a utility called iText, you can create PDF documents for free. iText even lets you create HTML, RTF, and XML documents (also for free).
This article introduces you to iText from the perspective of PDF-document creation. After showing you how to acquire iText, establish an appropriate directory structure, and set the CLASSPATH environment variable, I present a simple Java application that uses iText to create an elementary PDF document. The article then takes you on a tour of iText classes that you will frequently access from your Java applications, along with several small Java applications that demonstrate class usage. To show how iText helps you with big PDF projects, the article concludes by showing you how to create a multichapter PDF document on the solar system's planets. That project's more extensive Java application references several of the classes that were explored in the tour and reveals how iText capabilities combine to create a significant PDF document.