Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dBase3 printer escape codes 2

Status
Not open for further replies.

odrg

IS-IT--Management
Aug 31, 2005
1
CA
I am running SBT Accounting with Foxbase on a Novell network using Dos 3.3 and nothing has bombed for 22 years. My laserjet II finally bit the dust so i need to know how i can tell my HP 1160 printer to use condensed print for a *.lbl from within a *.prg. HP tells me the codes are ESC&k2S to set the printer to compressed mode but using:

. @ 5,5 say CHR(27) +"&k2S"
. label form laser.lbl to print

doesn't work. Any ideas??
 
First, if you have other Foxbase or FoxPro questions, in the future post to forum182. In addition, there are several Visual FoxPro forums (if and when you upgrade) which has a general forum at forum184 and more specific ones can be selected here:

Now, as for your problem here, you were just printing to the screen, not the printer, so that's why it didn't help. This should work:
Code:
* Send Compressed style directly to printer
??? CHR(27)+"&k2S"
LABEL FORM laser.lbl TO PRINT
* Reset 10 CPI pitch style directly to printer
??? CHR(27)+"&k0S"
*
*
*More fun:
* Set 12 CPI (elite) pitch style directly to printer
??? CHR(27)+"&k4S"
*
* The style command group allows any CPI:
* Example: Change to 10 CPI pitch style
??? CHR(27)+"(s10H"
* Example: Change to 12 CPI pitch style
??? CHR(27)+"(s12H"
* Example: Change to 15 CPI pitch style
??? CHR(27)+"(s15H"
Note: the lines beginning with an asterisk (*) are comments only for your benefit, you do not need to type them!

The three question marks send the strings directly to the printer without any formatting and without having to SET PRINTER ON or SET PRINTER OFF.

Let us know if this helps. --- dbMark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top