Some time ago, I wrote the blog, “Export Spooled Files to PDF Files,” that described the support available in the 6.1 and 7.1 releases to generate PDF files, either natively or by converting spooled files to PDFs. Near the end of that blog article I wrote, “I wonder if IBM will provide an easier interface to do this someday? It seems like it would be really nice to simply copy a spooled file to a PDF ... ”
IBM has recently released a PTF that enhances the Copy Spooled File (CPYSPLF) command to support copying a spooled file to the integrated file system. With this PTF, CPYSPLF now has additional parameters to specify the location the file is to be stored in the IFS; it also now supports the capability to specify a workstation customizing object (WSCST), which provides support for converting the spooled file to a different format, and in particular, the capability to convert a spooled file to a PDF file. Like the graphical interface written about previously, the Transform Services (5770-TS1) licensed program product must be installed.
Note the new WSCST parameter supports all Host Print Transform customizing objects. For example, QWPGIF, QWPTIFFPB, and QWPTIFFG4 (in the QSYS library) will convert your spooled file to a GIF or TIFF image, using two different compression methods for TIFF. These WSCST values don’t require the Transform Services product.
PTF SI43471 describes the new parameters and has the associated help text.
I'd like to thank Bob Baron from the IBM i print team for his assistance in writing this blog post.




I should note this PTF is only available on the 7.1 release.
Posted by: Dawn | May 11, 2011 at 08:04 AM
Why does everything from IBM have to be so complicated? On other systems you say I want the output in .PDF format and you tell it the printer you want it to print to? Can't IBM supply everything behind the scenes to just make it work?
I love the system i (I still call it the AS/400) but I also understand why people think this system is from the dark ages and are actually surprised that we are on this platform.
Keep it simple.
Posted by: harry daum | May 11, 2011 at 06:12 PM
So, what's the ptf for v6r1?
Posted by: Elaine VanSon | May 12, 2011 at 07:35 AM
Great PTF, too bad it is only for 7.1 release....
Posted by: Al Nelson | May 13, 2011 at 08:25 AM
Dawn, Do you know if there are any intentions of providing us this PTF for V6R1??? This is great stuff. Been waiting a long time. Thanks
Posted by: Bob Ausen | May 13, 2011 at 09:03 AM
This enhancement was only made available in V7R1 because it makes use of significant changes between V6R1 and V7R1 in both Host Print Transform and the 57xxTS1 Transform Services product. Those changes would have to be PTF'd back to V6R1 first, and that's a major undertaking (I'm not saying it's not on the table, but, we cannot commit yet to something that far into the future.)
The non-PDF part of the CPYSPLF changes could be PTF'd back now if that would really be useful, then *PDF added later if and when it becomes available in Host Print Transform. However, we are concerned that these other image and document formats would not meet users' requirements.
Best regards,
Bob Baron, IBM
Posted by: Robert Baron | May 19, 2011 at 11:33 AM
Making PDF from a spooled file is a feature I've been waiting for a long time. Unfortunately even on the 7.1 version, the solution lacks the support of the 870 code page characters.
It's hard to explain to the customers, that this feature is not suitable for hungarian characters.
It should be a simple and complete solution.
Posted by: Tibor Keresztsi | July 28, 2011 at 09:09 AM
Hi Dawn,
Thanks for the article. Generating a PDF from a SPLF instantly becomes easy with this PTF, as long as I am able to make use of it.
My biggest problem with this is that my PDF does not end up looking as nice as the printout. Do you know if there is a way to adjust offsets and etc? When I print the SPLF to paper it looks perfect, but when I CPYSPLF it to PDF, the overlay is not in the correct place.
Posted by: Jeff Peterson | August 31, 2011 at 03:01 PM
Sorry for the delay. I really should check in more often to see if there are new comments.
On the code page 870 question, the v7.1 support requires availability of an AFP font to embed into the PDF in order to properly display characters outside of the ANSI set. This is mentioned in section 10.5.2 of the redbook that provides the IBM i 7.1 Technical Overview: http://www.redbooks.ibm.com/redbooks/pdfs/sg247858.pdf
The two font LPs suggested in the redbook article have since been replaced by *5733-B45; IBM AFP Font Collection for i, V3.1* The "Outline" font feature of this LP provide the best fonts for use in PDF. Once you've installed the SBCS Outline Font option of this LP, PDF documents with code page 870 will be created so they can be displayed correctly.
The overlay positioning problem that Jeff mentioned sounds like it may be a problem that development needs to look at. Contact IBM Software Support and they can help collect the proper documentation so we can investigate it.
Hope this helps,
Bob
Posted by: Bob Baron | October 20, 2011 at 01:30 PM
Hi Dawn,
Do you know if this PTF can support AFP functions like graphics and barcodes..?
Posted by: Dhiraj | December 08, 2011 at 02:20 PM
Hi Dhiraj,
The PDF transform used by CPYSPLF supports all but the very newest barcodes (like DATABAR.) And It supports AFPDS fonts and images, including JPEG and TIFF. I am not sure about GOCA graphics -- I haven't tested one that yet.
Hope this helps,
Bob
Posted by: Robert Baron | December 15, 2011 at 01:52 PM