Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to fast print to Dot-matrix printer (and not generic
Message
From
01/06/1999 04:36:56
 
 
To
18/05/1999 02:29:14
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00219285
Message ID:
00224815
Views:
14
>Elbert,
>
>The most efficient way to make caracter based documents, is to write the invoice to a text file first (May be handy to store the in a separate directory for later use).
>
>SET PRINTER TO (cFile)
>SET PRINTER ON
>SET CONSOLE OFF
>
>??? Controlcodes
>? cText
>??? Controlcodes
>
>SET CONSOLE ON
>SET PRINTER OFF
>SET PRINTER TO
>
>After this you can write the text file to a LPT port with the following command.
>
>COPY (cFile) TO Lpt1.dos
>
>If you're a network and the printers are not attached to a LPT port you can use:
>
>! NET USE LPT9 \\Servername\printername /yes
>(of course you also could use the waddconnection api call)
>
>command to attach the printer to LPT9

Rather than this, you can use the Win32 API call CopyFile() to the UNC of the network printer or port - I posted code for this a couple of weeks ago. This has the advantage of working identically cross-platform, and avoiding having to explicitly attach the printer to the port via NET USE or one of the WNet API calls.

>
>Walter,
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform