Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to detect Laser printer or Dot Matrix ?
Message
From
21/01/2000 14:01:25
 
 
To
21/01/2000 04:52:26
Yuri Myasnikov
Bank Menatep Spb., Chelyabinsk Dep.
Chelyabinsk, Russia
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00320797
Message ID:
00321045
Views:
19
>Hi All!
>
>May be anybody know how to detect(programm's way)Laser printer or Dot Matrix ?
>It is a must for append to file( for printing) corresponding type of printer to controlling codes ( exmpl.-Portrait or Landscape and etc.)
>

To amplify Robert's statement, the only clue would be to examine the driver for the chosen printer, match it up against a table of all known printers, and have each known printer identify itself as a given type. This is not a foolproof method - some printers like the Generic/Text Only printer are ubiquitous - anyone can use them, and no model-specific detail is exposed, or you cn intentionally use a different driver - some of the Panasonic lasers, notably the 4450i, could emulate the IBM ProPrinter and Epson FX-80.

If the devie is not a PnP device, run under a PnP OS, it doesn't even identify itself to the syustem - you tell the system what type of printer it is during installation. And then there are printers that fit neither designation.

You're going to have to get the user to cooperate here and tell your program what it's dealing with.

You've made a really horrid assumption IAC; not all dot-matrix printers use the same control codes, not do all lasers. better to rely on the printer being instlaled properly and use the Windows GDI to handle printer control.
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