Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Open and Print a PDF file
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00773960
Message ID:
01270489
Vues:
28
Sergey,
both samples work for me. Is there any way to print a PDF and then have VFP close Adobe so the user can just select some PDFs to print from a list and my prg can do the rest?

Thanks,
John.



>>I need to Open and Print a PDF file from VFP. Someone can help me?
>
>You can use ShellExecute API #12636.
DECLARE INTEGER ShellExecute IN "Shell32.dll" ;
>    INTEGER hwnd, ;
>    STRING lpVerb, ;
>    STRING lpFile, ;
>    STRING lpParameters, ;
>    STRING lpDirectory, ;
>    LONG nShowCmd
>
>lcPDFfile = "c:\mydir\myfile.pdf"
>* Open PDF file
>=Shellexecute(0,"Open", lcPDFfile, "","",7)
>* Print PDF file
>=Shellexecute(0,"Print", lcPDFfile, "","",0)
>
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform