Converting an IBM i Spool File to a PDF
A comprehensive four-step approach
Today’s digitized world is forcing many IBM i shops to Web enable their existing applications or redevelop them for the Web browser. During this process, many businesses want to use the existing code to reach the market faster. One oft-requested functionality is accessing the spool files as a PDF in the Web browser. In this article, I’ll provide information on how to create a Java program that takes the spool file attributes as the parameters, converts it into a PDF and saves it on the IFS. In this Java program, I’ll also explain how to convert the *AFPDS spool file to a PDF.
The IBM Toolbox for Java is a set of .jar files and APIs that provides functionality to access IBM i objects from within Java. JTOpen is the open-source version of IBM Toolbox for Java, and I’ll use it to access the spool file on IBM i. I’ll also use iText, an open-source package that helps create PDF files. WebSphere Development Studio Client (WDSC) Advanced Edition for iSeries is my editor and development environment.
Here’s a comprehensive four-step approach to converting the spool files to PDFs.
comments powered by