CompuServe Thread

#Printer Control Codes

4 messages in this thread
#271831From: Ken BernsMay 14, 1995 6:52 PM
With my old Citizen MSP50 printer I was able to manipulate the printer buttons to do a "Hex Dump" so that I could view (and print) the control commands (in hexadecimal code) that the printer received. This was handy when trouble shooting printout problems with my word processor of XBase applications. I am using an HP LaserJet 4L printer now. How do I go about doing something similar with the 4L?
#271868From: Thomas S. BoardmanMay 15, 1995 2:00 AM
You didn't say what operating system or software you are using. If you are using MS-Windows or Windows for Workgroups, try this: From program manager, go to MAIN, CONTROL PANEL, PRINTERS. Highlight your HP Laserjet 4L printer and click on CONNECT. In the list of possible connections (LPT1, COM1, etc.) choose FILE. Then chose OK, CLOSE and then exit the control panel. The next time you print from any windows application, chose printer setup and make sure you have selected the printer that is connected to File. When you actually print the document, a pop-up window will appear and ask you to choose a file name. The entire print stream, including all control codes will be sent to the file you chose (instead of to your printer.) You can then view the file using whatever viewer you want. I hope this helps. Tom Boardman
#271950From: Irv ThomaeMay 15, 1995 8:46 AM
One of the advantages of HP's PCL language is the fact that except for the Esc character itself, almost all commands are composed entirely of 'normal' characters such as letters, digits, and punctuation symbols such as '*', '&', '(', ')', '@', and '%', so you seldom *need* a full hex dump. I'll just supplement Scott's answer by explicitly commenting that the PCL printers don't have a hardware function equivalent to your old machine's Hex Dump". There *is* a command which can be used to force the characters immediately after it to be printed as symbols, instead of responded to as control-codes. It's called "Transparent Print", and its format is <Esc>&p#X… where you substitute for the '#' the number of characters which are to be thus treated. (The maximum value is 32767.) I've never tested that command on a mixture of control-codes and normal characters, but you might try tacking it onto the beginning of a (short) file. Since the only control codes in most PCL files are Esc, CR, LF, and FF, it might be useful if it works. Irv Thomae (SizeIt author) Succinct Systems, Inc.
#271990From: Scott GillespieMay 15, 1995 10:49 AM
Ken The HP "troubleshooting" command is <esc>Y. This command tells the printer to ignore all commands (escapes) and print thus print them in "plain" text. To use the command, you'll need a little more help: switch to symbol set 10U, which has graphical representations of things like FF, ESC, etc. Also, you'll need to turn on auto line wrap (otherwise, you'll get truncated) So: <esc>(10U<esc>&s0C<esc>Y