Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printer setup escape sequences
Message
From
06/02/2009 03:18:26
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01379709
Message ID:
01379732
Views:
24
Windows' printer driver will not let the control characters pass through to the printer. In reality you have only two choices:
1. create new reports
2. use the Generic/text only printer driver and regain the control you want over the printer.

Althought solution 1 immediately seems less appealing, I still recommend that solution.

>I am having issues with sending printer set up codes to my HP Laser Jet 1320 printer on a local XP home network. I am using a legacy .prg report I have used for many years in another xBase system. I am now migrating and rewriting my legacy program in VFP9 SP2.
>
>In the first blank row of the report I send the escape code thusly:
>? chr(027) + chr(038) + chr(108) + CHR(054) + CHR(068) + chr(100) && 6LPI off.
>
>This command doesn't break the .prg, it does actually print the escape code on the output (not desired!), but more importantly, it doesn't change the printer as I desire. The print driver is the universal HP driver for XP using PCL 6.
>
>I set up the print environment as so:
>
>IF SYS(102) = 'OFF'
> SET PRINTER ON
>ENDIF
>
>IF SYS(101) = 'SCREEN'
> SET DEVICE TO PRINTER
>ENDIF
>
>IF SYS(100) = 'ON'
> SET CONSOLE OFF
>ENDIF
>
>Any help is greatly appreciated.
>
>GSD
Previous
Reply
Map
View

Click here to load this message in the networking platform