Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Print Spooler issue
Message
De
17/02/2011 02:10:34
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01500432
Message ID:
01500470
Vues:
83
>>>Hi,
>>>
>>>I have a program that runs on a customer server 24/7 and prints forms (orders). The printing is done in the timer of the form with the following code (simplified):
>>>
>>>
>>>set printer to name (cPrinterName)
>>>report form MyForm next 1 noconsole nodialog to printer
>>>
>>>
>>>The value of the printer name (above variable cPrinterName) changes depandeing on value some other field.
>>>
>>>The customer complains (sometimes) that often the printing stops and what they have to do is go to the Printer server -> Services -> Restart Print Spooler.
>>>
>>>Can my program (the way I print as shown above) cause the problem with the Print Spooler? Anything is missing in m program?
>>
>>If Tore's suggestion works for you, that's an easy fix.
>>
>>If not, here are some other things to consider:
>>
>>- I've seen a print spooler hang if someone sends a large print job with a lot of graphics to the printer. I've also seen it happen with a medium-sized Excel print job where "fit to page" was selected. In this case there may be an error message in the event logs along the lines of "print spooler consuming a lot of system resources". What might be happening in your case is your print jobs are fine, but someone else might be sending these types of print jobs to the same printer, and causing the spooler to hang.
>>
>>- Another subtle thing to check is the free memory the printer driver on the print server thinks the printer has, vs. how much the printer itself reports. If the driver thinks the printer has more memory than it actually has free, you can get spooler problems. You can get the former info from advanced properties of the printer driver, and the latter from the web server config page of most modern network printers.
>
>Al,
>
>Do you know of any way of programmatically controlling Printer Spooler from VFP?
>
>Thanks in advance.

From a command prompt you can issue
NET STOP SPOOLER
NET START SPOOLER
assuming you have sufficient privileges. These affect only the local machine, not remote ones.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform