Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
PDF to Specific Printer
Message
 
À
28/07/2005 13:40:20
John Tomblin
Service Station Systems, Inc.
San Jose, Californie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01036696
Message ID:
01036697
Vues:
8
>Using ShellExecute with the verb "Print" and a PDF file prints the file just fine. The problem is that I need to print to a printer that is not the default printer. I can set the printer with:
>set printer to name "Printer Name"
>That works fine for Foxpro output but, ShellExecute knows nothing about Foxpro's printer.
>ShellExecute has a "parameters" argument but Acrobat's documentation doesn't mention (or at least, I can't find any mention) of what parameters are avalible. I was hoping for a "printer to use" parameter.
>Another direction was to try to change the Windows default printer and then switching back to the original after the print job. Set() can tell you the Windows default printer but set "printer to" doesn't provide a means of setting the Windows default.
>
>Does anyone have any ideas?

You can change windows default printer with the following code:
loNetwork	= Createobject('WScript.Network')
loNetwork.SetDefaultPrinter('Your printer')
"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
Répondre
Fil
Voir

Click here to load this message in the networking platform