Microsoft KB Archive/43744

From BetaArchive Wiki
Knowledge Base

Directly Connected ImageWriter LQ Problem with OPEN "LPT1: "

Article ID: 43744

Article Last Modified on 1/8/2003


  • Microsoft QuickBasic Compiler for Macintosh 1.0

This article was previously published under Q43744


Output to an Apple ImageWriter LQ printer may give problems if it is directly connected and you output to it using the "LPT1:" or "LPT1:PROMPT" device name from your Microsoft QuickBASIC program. The problems do not occur when sending output to the ImageWriter LQ printer over the AppleTalk Network.

The LPT1: device is expecting to communicate with a device at 9600 baud. The ImageWriter LQ communicates at a rate of 19,200 baud. To communicate with a directly connected ImageWriter LQ printer from your QuickBASIC program, you must connect the printer to the communications port and use the OPEN "COM1:" statement instead. Output can then be sent with the PRINT#n or WRITE#n statement.


The major drawback with output to COM1: is that the WINDOW OUTPUT #n statement (for redirecting graphics to the printer) is not supported to the COM1: device. Your program must send the proper Apple ImageWriter printer control codes to change the font and size of printed text. The ImageWriter's control characters invoke only certain character-mode fonts, such as Elite and Pica, which don't look like Macintosh graphics-mode fonts. Your program must also send a carriage return and linefeed character sequence at the end of each line.

If the ImageWriter LQ still prints strange characters using the method described above, check the dip switch settings for the printer. Specifically, check the fourth dip switch on the second bank of switches. It should be in the UP position. Check your ImageWriter LQ user's manual for the location of these switches.

Additional query words: MQuickB

Keywords: KB43744