Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to print PDF file from VFP directly?
Message
De
19/05/2004 10:34:32
 
 
À
18/05/2004 22:24:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00904836
Message ID:
00905279
Vues:
53
The below code will send the pdf directly to the default windows printer without opening up Adobe Reader. However, you must specify the path to Adobe Reader for lpDirectory. It works with Adobe Reader 6.
DECLARE INTEGER ShellExecute IN "Shell32.dll" ;
    INTEGER hwnd, ;
    STRING lpVerb, ;
    STRING lpFile, ;
    STRING lpParameters, ;
    STRING lpDirectory, ;
    LONG nShowCmd

= ShellExecute(0, "open", "acrord32.exe", " /p /h c:\test\test.pdf", "c:\program files\adobe\acrobat 6.0\reader\", 0)
Actually, I take that back. If there is a registry entry for acrord32.exe then it works without the path. I just tested the below succsfully:
DECLARE INTEGER ShellExecute IN "Shell32.dll" ;
    INTEGER hwnd, ;
    STRING lpVerb, ;
    STRING lpFile, ;
    STRING lpParameters, ;
    STRING lpDirectory, ;
    LONG nShowCmd

llok=ShellExecute(0, "open", "acrord32.exe", " /p /h c:\acordforms\finishedforms\61nc.pdf", "", 0)
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform