|
Hi Michael,
By "wrapping the print" I mean that whatever printed output is being sent to the printer from the OUTQ, I need to prefix some lines with PJL and PCL commands to the beginning and I need to append some other lines of PJL and PCL commands to the end.
The CRTDEVPRT command has a parameter called USRDTATFM that lets you specify a program that's job is to (ostensibly) transform the data from the SCS or AFPDS formats used in the spool to whatever the printer's language is.
IBM provides a sample program called TSPRWPR in the QUSRTOOL library that demonstrates how to write such a user defined translation program. In IBM's sample, all it does is call the Host Print Transform API to trasnlate the spooled data into the printer's language, but it also adds some other features, such as subsetting the document by page range, etc.
Rodney Johnson from IBM once wrote an updated copy of TSPRWPR that demonstrated how to add some PJL commands to the start of the document in order to enable the hole-punching feature of a particualr IBM printer. In his demonstration, it added these commands:
<ESC>%-12345X <--- the PCL code to escape to PJL mode. @PJL SET LPUNCH=ON <--- the PJL code used by the IBM printer At the end of the document, it added this: <ESC>%-12345X @PJL SET LPUNCH=OFFObviously, Rodney's goal was to tell the printer to punch holes in the paper, which is a little differnt than your goal, but perhaps you could modify the program to insert your own PJL codes as you see fit? Obviously, you'd need some C programming expertise to do that.
Here's where Rodney announced this program: http://tinyurl.com/2jzefcIf this makes sense to you, maybe you could contact him for a copy of the program, perhaps Paul Tykodi (a printer guru who participates in this list) might be able to help you get a copy. He's the one that told me about all of this stuff.
Good luck.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.