HP 5100tn Printer Job Language - Technical Reference Manual - Page 266
Example, Using RDYMSG in a, Batch File
View all HP 5100tn manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 266 highlights
Example: Using RDYMSG in a Batch File This example demonstrates how to use a batch file to send PJL commands to the printer. In this example, the batch file acts as a spooler, using the RDYMSG command to display the file name while a print file is being downloaded. To send PJL commands this way, first create an ASCII file named UEL, containing only the UEL command (%-12345X). In this file, be sure to substitute ASCII character 27, the escape character, for , and do not add any spaces or characters after the X. Then create a batch file as shown here, and save it as PRINTPJL.BAT, in the same directory as the "UEL" file. The batch file uses the DOS ECHO command to send PJL commands, and the DOS COPY command with the binary option to send the UEL file and the pre-existing print file to the printer. @ECHO OFF CLS ECHO Printing the %1 Job! COPY UEL /B PRN: ECHO @PJL > PRN: ECHO @PJL JOB > PRN: ECHO @PJL RDYMSG DISPLAY = "%1" > PRN: ECHO @PJL ENTER LANGUAGE = PCL > PRN: COPY %1 /B PRN: COPY UEL /B PRN: ECHO @PJL COMMENT Restore READY message > PRN: ECHO @PJL RDYMSG DISPLAY = "" > PRN: ECHO @PJL EOJ > PRN: COPY UEL /B PRN: @ECHO ON To use this batch file, type the name of the batch file, followed by the name of the print file, as follows: PRINTPJL printfilename The printfilename is displayed while the job is being downloaded to the printer. C-4 Programming Examples