Niakwa On-Line News Brief
Volume 3 No. 14 Community News & Information July 26, 1999
In this Issue:
* TECH BYTES
It has come to our attention that the latest Niakwa News requires a correction on page 10 in the Tech Bytes article. The corrected version follows.
In the past, some developers hesitated to use the Windows RunTime because their application was sending printer control codes to the printer. The problem was that the Windows Print Manager stripped out the control codes and the developer had no control over the printing process. That changed with the release of Revision 4.22 which introduced the "XPA=Y" option
The "XPA=Y" clause permits printer control codes to be "passed through" the printer driver to the printer instead of being stripped out as in the past. Most printer drivers support the "pass through"
option, but not all.
The correct syntax to enable "Pass through control codes" is
$DEVICE(/XXX)=">(printer driver address) XPA=Y"
This of course must be entered in the device table.
Here's a handy trick to find the correct way to address the Windows printer driver.
1. Make sure the printer is configured in Windows 95, 98 or NT.
2. Write a small program
10 $DEVICE(/215)=">(?) SET=Y"
20 SELECT PRINT 215
30 PRINT "HELLO"
3. Run this program using RTIWIN. A Windows printer selection box will pop up and allow you to select a printer.
4. Select the printer you want to define and let it print. Don't exit the RunTime, but enter "LIST DT".
5. Make a careful note of the exact way device 215 is listed.
6. Enter that DEVICE definition into your program device table and substitute XPA=Y for SET=Y.
As mentioned earlier, MOST printer drivers support the "pass through"option. If a particular printer driver doesn't support the "pass through" option, you will get a P-48 error the first time you try to
print to that device. If that happens, you can configure Windows' "Generic text only" printer driver for that printer and use the "XPA=Y" option. After all, you are sending control codes to the printer anyway. If you get a double page feed at the end of the print job, change the "Paper" setting in the properties window of the Generic printer driver to "Continuous, No page break".
Here's a little tip for troubleshooting printer problems in the Windows runtime. Try setting the XPA=Y option, even if you're not sending control codes. It might help correct some line feed problems.