Free Easy/400 PDF Software Now Supports i 6.1 Feature

Article ID: 58220

I'm willing to bet that you didn't know that IBM i 6.1 has support for generating PDFs for free with a simple Override with Printer File (OVRPRTF) command. Issue the appropriate OVRPRTF command before running your RPG or Cobol program, and presto you have a PDF in your IFS! More about that in a moment . . .

However, there's something missing from this PDF support in 6.1. It gives you no way to distribute your PDF report to your users. Giovanni Perotti of Easy400.net has proposed a free solution, however. The open-source MIME & Mail (MMAIL) package, which has been around for many years already, now supports the 6.1 PDF creation ability. This is in addition to its own PDF creator, which works on IBM i 5.1 and higher.

Free Support for PDFs

To use the free support for generating PDFs in IBM i 6.1 (which works with or without the Easy400 product), you'll need the following licensed programs installed. These are all free and are included on the CDs that IBM ships with IBM i:

  • 5761-SS1 option 3, Extended Base Directory Support
  • 5761-SS1 option 33, Portable App Solutions Environment (PASE)
  • 5761-TS1 *BASE and option 1, Transform Services for IBM i

(You'll notice that InfoPrint Server is not required for this new support.)

Once the programs are installed, you can generate PDFs by simply typing the following command:

  OVRPRTF FILE(print-file) DEVTYPE(*AFPDS) WSCST(*PDF) +
          TOSTMF('/usr/local/pdfs/my-pdf-file.pdf')
  CALL PGM(MYRPGPGM)
  DLTOVR FILE(print-file)

Hard to beat for simplicity, isn't it? I first encountered this technique in a forum discussion regarding The Essential Guide to Document Management from August 2008. A more detailed article followed in January's System iNEWS magazine, and more recently it popped up on the iDevelop blog. Rather than try to recap what they've said about this new support, here are links to the sources:

Support in MMAIL

The MMAIL package has provided free email tools, including a tool to convert spooled files to PDF, for quite a while already. To use it, you invoke the Start E-mailing Spool Files (STREMLSPLF) command, which converts the spooled file to PDF, then sends the PDF in an email.

However, this support had to change for the IBM i 6.1 spooled file generator. You no longer need a tool to convert the spooled file to PDF, but instead you need a tool to see that you've generated a new IFS file and automatically email it to the recipient. Perotti's approach was to include a STRIFSMON command that monitors for new files to appear in a given IFS directory. When a new file is generated (presumably by the aforementioned OVRPRTF command that points the file to the IFS), the STRMONIFS software "wakes up" and sends the document.

In fact, this support doesn't require the IBM i 6.1 support for generating PDFs. You could generate them using Acrobat Distiller from your PC software, save the output to the appropriate IFS directory, and STRIFSMON would see the file and send it. Basically any software that generates a PDF and saves it to an IFS directory works. Indeed, you can use this tool on V5R4 if you want to.

Check out this page for details of the IFS monitoring tool. For downloads and documentation or to view more of Easy400's open-source offers, visit Easy400.net.

ProVIP Sponsors

ProVIP Sponsors