Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending a PDF to a particular printer
Message
De
15/09/2003 11:08:45
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00828667
Message ID:
00829004
Vues:
24
Wayne,

I think - have not tested - you can get away with that by
sending CTRL-Q to the acrobat window after a while 
   if no acrobat window was active before (they load in the same instance)
>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
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform