Given that Adobe Acrobat 5 is installed on the PC running
my VFP 6 SP5 application, and given that there is a specific
PDF file sitting somewhere on the PC's hard drive, I want
to gracefully print a hard copy of that PDF to the current
Windows printer.

I have looked through the Acrobat SDK and see the DDE calls
such as FilePrintSilent but have only been able to use this
by first starting up Acrobat *Reader*, establishing the DDE
connection to it, then printing the desired PDF. This is very
clunky and visually ugly with Reader popping up. I am
extensively using Acrobat itself through OLE automation which
is completely invisible to the user, but I see no way to use
an Acrobat OLE object
to print a hard copy of a specific PDF file. You can print
a PDF file within the Acrobat application itself, but not
via OLE? Seems odd. Has anyone had success with printing
a hard copy of a PDF file invisibly from within VFP? Perhaps
a third-party tool?

-- TRW
_______________________________________
My e-mail: t r w 7
@ i x . n e t c o m . c o m
_______________________________________

Re: Must be an easy way to do this... by trw7at

trw7at
Wed Nov 26 18:13:28 CST 2003

As usual, just after I post something, I figure it out.

I have been using the AcroExch.PDDoc OLE object to control Acrobat.
This has no printing methods. I found the printing methods I
needed on the AcroExch.AVDoc object. Using the PrintPagesSilent
method, I was able to print the PDF file with no visible
distractions:

LOCAL loPDF

loPDF = CREATEOBJECT("AcroExch.AVDoc")
loPDF.Open("c:\temp\discrete.pdf","")
loPDF.PrintPagesSilent(0,4,1,0,0)
loPDF.Close(1)

Maybe someone else will find this useful.

-- TRW

Tim Witort seemed to utter in news:Xns943FA0953E27Ftimwitortwrotethis@
207.217.77.205:

> Given that Adobe Acrobat 5 is installed on the PC running
> my VFP 6 SP5 application, and given that there is a specific
> PDF file sitting somewhere on the PC's hard drive, I want
> to gracefully print a hard copy of that PDF to the current
> Windows printer.
>
> I have looked through the Acrobat SDK and see the DDE calls
> such as FilePrintSilent but have only been able to use this
> by first starting up Acrobat *Reader*, establishing the DDE
> connection to it, then printing the desired PDF. This is very
> clunky and visually ugly with Reader popping up. I am
> extensively using Acrobat itself through OLE automation which
> is completely invisible to the user, but I see no way to use
> an Acrobat OLE object
> to print a hard copy of a specific PDF file. You can print
> a PDF file within the Acrobat application itself, but not
> via OLE? Seems odd. Has anyone had success with printing
> a hard copy of a PDF file invisibly from within VFP? Perhaps
> a third-party tool?
>
> -- TRW
> _______________________________________
> My e-mail: t r w 7
> @ i x . n e t c o m . c o m
> _______________________________________
>



--
_______________________________________
My e-mail: t r w 7
@ i x . n e t c o m . c o m
_______________________________________

Re: Must be an easy way to do this... by Willianto

Willianto
Mon Dec 01 09:44:56 CST 2003

Thanks for sharing Tim,

I am in a project that generate a lot of reports. I am considering to
use pdf format to enhance the look of the reports. I'll keep your
solution in my mind!

Btw, you were saying 'Adobe Acrobat'. Can I use the freely available
Acrobat Reader instead?

Regards,
Willianto

Tim Witort wrote:
> As usual, just after I post something, I figure it out.
>
> I have been using the AcroExch.PDDoc OLE object to control Acrobat.
> This has no printing methods. I found the printing methods I
> needed on the AcroExch.AVDoc object. Using the PrintPagesSilent
> method, I was able to print the PDF file with no visible
> distractions:
>
> LOCAL loPDF
>
> loPDF = CREATEOBJECT("AcroExch.AVDoc")
> loPDF.Open("c:\temp\discrete.pdf","")
> loPDF.PrintPagesSilent(0,4,1,0,0)
> loPDF.Close(1)
>
> Maybe someone else will find this useful.
>
> -- TRW
>
> Tim Witort seemed to utter in news:Xns943FA0953E27Ftimwitortwrotethis@
> 207.217.77.205:
>
>> Given that Adobe Acrobat 5 is installed on the PC running
>> my VFP 6 SP5 application, and given that there is a specific
>> PDF file sitting somewhere on the PC's hard drive, I want
>> to gracefully print a hard copy of that PDF to the current
>> Windows printer.
>>
>> I have looked through the Acrobat SDK and see the DDE calls
>> such as FilePrintSilent but have only been able to use this
>> by first starting up Acrobat *Reader*, establishing the DDE
>> connection to it, then printing the desired PDF. This is very
>> clunky and visually ugly with Reader popping up. I am
>> extensively using Acrobat itself through OLE automation which
>> is completely invisible to the user, but I see no way to use
>> an Acrobat OLE object
>> to print a hard copy of a specific PDF file. You can print
>> a PDF file within the Acrobat application itself, but not
>> via OLE? Seems odd. Has anyone had success with printing
>> a hard copy of a PDF file invisibly from within VFP? Perhaps
>> a third-party tool?
>>
>> -- TRW
>> _______________________________________
>> My e-mail: t r w 7
>> @ i x . n e t c o m . c o m
>> _______________________________________