The new java.net project "PDF Renderer: a 100% Java PDF renderer and viewer" is an open source, all Java library which renders PDF documents to the screen using Java2D.
The code for this project originated from Sun Labs PDF Renderer that is part of an audio collaboration tool known as Sun Labs Meeting Suite, which allowed for presentations to be created with OpenOffice.
Sun has released the code under the LGPL as part of SwingLabs, meaning it will follow the same rules as other SwingLab projects. This will make it easily embeddable into applications, writes Sun Engineer Joshua Marinacci, who has been working with other members of the Java desktop team to make this project possible.
Marinacci explains why this project is exciting, important, and worth your time.
"Soon to be an ISO spec, PDF is the standard way of exchanging non-interactive documents on the web. ... PDF is everywhere. ... Once a PDF is created you know with great certainty that it will display and print exactly as you want on any platform. Hmm. Write a PDF once and run it anywhere? Sounds like a good fit for Java! Combined with PDF writing libraries (like iText), you can do pretty much anything you want with PDFs," he opines.
The project website clearly states that the PDF Renderer does not generate PDF documents, instead it views them. Ideas it sets forth to use it for include viewing PDFs in applications, printing and previewing before exporting PDF files, rendering PDFs to PNGs in a server-side web application, viewing PDFs in a 3D scene, and drawing on top of PDFs and annotating them in a networked viewer.
Experimentations with this project include Project Wonderland projecting PDFs into its 3D shared universe, and Marinacci states he is working on building a PDF import for the designer tool.
The library implements most of the PDF 1.4 spec; however, areas where more work is needed is in bringing transparency, fill-in forms, and some font encodings. "We hope that interested developers in the community will help us fill in these missing features," Marinacci states.
Visit the project website to download the code and learn more on how to get started.
Read More ...