Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Any way to find out if a printer is using a PCL driver?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00911961
Message ID:
00911974
Vues:
17
What I know is that it should be possible using WMI, but, unfortunately the property value for this is apparently not set, at least for the printers we have, we got null values for the 2 properties we needed the most! :)

If you are running Windows XP, Windows 2000 Professional, and Windows NT Workstation 4.0, the WMI code for this would be something like this:
loLocator            = createObject("wbemScripting.SwbemLocator")
loService            = loLocator.ConnectServer()
loPrinters           = loService.ExecQuery('Select * from Win32_Printer')

for each loPrinter in loPrinters
   ?? loPrinter.name, loPrinter.MarkingTechnology
   if not Isnull(loPrinter.LanguagesSupported)
		for each lnLanguage in loPrinter.LanguagesSupported
			?? lnLanguage
		endfor
	else
		?? 'No languages supported found'
	endif
	?
endfor

*!*	MarkingTechnology Table of values

*!*	Value 	Meaning
*!*	1 	Other
*!*	2 	Unknown
*!*	3 	Electrophotographic LED
*!*	4 	Electrophotographic Laser
*!*	5 	Electrophotographic Other
*!*	6 	Impact Moving Head Dot Matrix 9pin
*!*	7 	Impact Moving Head Dot Matrix 24pin
*!*	8 	Impact Moving Head Dot Matrix Other
*!*	9 	Impact Moving Head Fully Formed
*!*	10 	Impact Band
*!*	11 	Impact Other
*!*	12 	Inkjet Aqueous
*!*	13 	Inkjet Solid
*!*	14 	Inkjet Other
*!*	15 	Pen
*!*	16 	Thermal Transfer
*!*	17 	Thermal Sensitive
*!*	18 	Thermal Diffusion
*!*	19 	Thermal Other
*!*	20 	Electroerosion
*!*	21 	Electrostatic
*!*	22 	Photographic Microfiche
*!*	23 	Photographic Imagesetter
*!*	24 	Photographic Other
*!*	25 	Ion Deposition
*!*	26 	eBeam
*!*	27 	Typesetter

*!*	LanguagesSupported Table of values
*!*	Value Meaning 
*!*	1 Other 
*!*	2 Unknown 
*!*	3 PCL 
*!*	4 HPGL 
*!*	5 PJL 
*!*	6 PS 
*!*	7 PSPrinter 
*!*	8 IPDS 
*!*	9 PPDS 
*!*	10 EscapeP 
*!*	11 Epson 
*!*	12 DDIF 
*!*	13 Interpress 
*!*	14 ISO6429 
*!*	15 LineData 
*!*	16 DODCA 
*!*	17 REGIS 
*!*	18 SCS 
*!*	19 SPDL 
*!*	20 TEK4014 
*!*	21 PDS 
*!*	22 IGP 
*!*	23 CodeV 
*!*	24 DSCDSE 
*!*	25 WPS 
*!*	26 LN03 
*!*	27 CCITT 
*!*	28 QUIC 
*!*	29 CPAP 
*!*	30 DecPPL 
*!*	31 SimpleText 
*!*	32 NPAP 
*!*	33 DOC 
*!*	34 imPress 
*!*	35 Pinwriter 
*!*	36 NPDL 
*!*	37 NEC201PL 
*!*	38 Automatic 
*!*	39 Pages 
*!*	40 LIPS 
*!*	41 TIFF 
*!*	42 Diagnostic 
*!*	43 CaPSL 
*!*	44 EXCL 
*!*	45 LCDS 
*!*	46 XES 
*!*	47 MIME 
BUT...

Those properties return NULL for all the printers I tested, my guess is that it might be something to do with the drivers? I do not know, but if it runs for you, you were luckier than me :)
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform