Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending a PDF to a particular printer
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00828667
Message ID:
00828956
Vues:
25
You can close the window using Windows API calls FindWindow and DestroyWindow. These are in MSDN.

If you need help using these calls, let me know.

>Thanks Gregory!
>
>I found a little post here about it - and they mention the same problem I am experiencing - that adobe stays up after the print. http://www.peg.com/lists/peg/web/msg13558.html
>
>Anyone out there know how to get adobe to close?
>
>>>>>How can I send a pdf to a particular windows printer?
>>
>>
>>Wayne,
>>
>>ShellExecute does it. The only problem I see is that an acrobat window is left behind
>>
>>
>>FileName = '\tmp\test.pdf'
>>PrinterName = getprinter()
>>
>>?ShellExecute(0, 'printto', FileName, '"'+PrinterName+'"', 0, 0)
>>________________________________________________________________
>>The Printto command looks something like
>>
>>"C:\Program Files\Adobe\Acrobat 5.0\Reader\AcroRd32.exe" /t "%1" "%2" "%3" "%4"
>>
>>&& %1 : FileName
>>&& %2 : PrinterName
>>&& %3 : PrinterDriver
>>&& %4 : PrinterPort
>>
>>We're using the first two params
>>
>>ps : enclose all parameters in double quotes
>>
>>
>>You can find the printto command with regedit
>>HKEY_CLASSES_ROOT\AcroExch.Document\shell\printto\command
>>
>>and AcroExch.Document can be found in
>>HKEY_CLASSES_ROOT\.pdf in Default
>>
>>
>>And, of course, you can also change the windows printer, print, and reset the windows printer to its old value
Nigel B Coates
NBC Software Services
Dublin, Ireland.
eMail: Nigel.Coates@NBCSoftware.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform