Printer Control Codes
What they are and
what you can do with them
Printer control codes tell your printer how to print what you send it from Q&A.
When you enhance or format text in a document (or report or Print Spec), then print it, Q&A embeds in the document the pertinent printer control codes which it gets from your printer driver.
The printer interprets these embedded codes as instructions on how to print the document.
You never see these embedded codes unless you print the document to FILE then display the resulting file in Write.
Try it and see. Install another instance of your printer in Q&A (Utilities / Install Printer) but set it to print to FILE. Type a brief Write document and apply some fonts and enhancements to it, then print it to the FILE printer.
Display the resulting file in Write, and you'll see the printer control codes along with the text.
Now select Utilities / Modify Font File. Open the font file you use (it will have an .FNT filename extension). Press F-10 to move through the font descriptions, and you'll see similar-looking printer control codes. This is where Q&A gets the font and enhancement codes it embeds in documents you send to the printer.
Q&A also embeds codes that relate to your Define Page setup as well as codes that come from the More Printer Options screen you can optionally fill out when you install a printer in Q&A.
These printer control codes which Q&A adds to the "text stream" sent to the printer, tell the printer how to set up the page, how to print the text, and so forth.
In Q&A, you can add printer control codes to whatever you're printing that are independent of the Q&A printer driver.
You can type the raw codes at most Q&A Print Options screens. You can add them to documents, reports and Print Specs. You can use them when installing your printer in Q&A to specify which bins to use...and much more.
You can use these codes to "turn on" printer features not supported by your Q&A printer driver. See The Quick Answer Topic Index at this Web site for tips and articles on using printer codes.
Printer control code tables in printer manuals normally list codes in three formats Escape, Decimal, and Hexadecimal. The three codes shown below all cause a LaserJet or compatible to print in Landscape mode.

You never use the Hex format in Q&A, but you can use the other two formats throughout Q&A.
You can use the Decimal format at any Q&A Print Options Screen, and also in Write via the *Printer commands* option on the F8 Options menu. (In the example shown above, you'd drop any leading zeroes, like this:)
27 38 108 49 79
You can use the Escape format in Write documents as well as in headers and footers.
For example, if you type the escape command <*p500y at the top of your document or in a report header, it will cause an HP-compatible printer (laser or inkjet) to begin printing about 1 2/3" down the page.
You create the "Escape" in Q&A by pressing Alt-F10, then holding down the Alt key while pressing 27 on the numeric keypad.
The escape command <*l8D (lowercase "L") causes the printer to print a tight 8 lines per inch.
You'll get
the same result using the Decimal equivalent
*PRINTER 27 38 108 56 68*
in your Write document, and the same result using
27 38 108 56 68
on the Printer Control Codes line of the Print Options screen.
These are Vertical Motion Index or line spacing commands.
You can place a series of such commands in the header of a document or report to control virtually all page and printing characteristics.
You can have Q&A pass text or data to the printer, and use printer control codes to tell the printer where and how to print the stuff. That's really all a Print Spec does.
You can use these codes in Q&A Write document templates that you can then copy to create new documents.
You can make a printer print thick lines, drop shadows, shaded boxes, and complex forms (into which you can merge Q&A data) using these codes. See the March and October 1996 issues of The Quick Answer.
You can use Decimal commands at the More Special Printer Options screen (when installing a printer in Q&A) to control your printer's paper handling features, such as which bin(s) to use, when to eject the page, and how to recognize the start and end of a document.
In many cases, you can manually-add printer control codes to compensate for incorrect printing results.
The subject of printer control codes is so vast that it would take a book to do any justice to it. Suffice it to say that you can use them in Q&A to make just about any printer format your output any way you want.
PCL (Printer Control Language) codes are the ones most often used to control lasers and inkjets. If your printer is an HP or compatible, and its manual doesn't contain a table of these codes, contact Hewlett Packard technical (printer) support at http://www.hp.com
Suppose you have an HP DeskJet 800 series printer (or compatible). Ask for the HP DESKJET 800 SERIES PRINTER COMMANDS. HP will give you a number to call for the fax-back document containing the commands. Or ask the rep to email you the codes. They're easier to read that way.
Printer control codes can help you get the output you need from newer printers with features that aren't supported by the older Q&A printer driver you're using.
All you have to do is (1) determine the printer feature you want to invoke, (2) find the printer control code that invokes it, and (3) place that code in Q&A at an appropriate location.
Keep in mind that some printer features are invoked by a combination of codes, and some codes you must "turn off" if you want them to affect only a portion of the print job.
For example, you might use a printer control code in a document to set special line spacing for an indented paragraph. In this case, you'll need a companion code at the end of the paragraph to reset line spacing to the original value.