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