[python-win32] Re: Acrobat Reader
Roger Upole
rwupole at msn.com
Thu Apr 6 05:00:07 CEST 2006
Tim Roberts wrote:
> <mirco.furlan at visionee.com> wrote:
>
>>I'm trying to use an instance of Adobe Acrobat Reader. I can successfull
>>create an instance with win32com.client.Dispatch,
>>
>
> How did you do that? To my knowledge, the only way to do that is to use
> AcroExch.App, which is only exposed by the full Acrobat product, not the
> Reader. As far as I know, the standalone Reader application simply
> cannot be controlled via COM. There is an ActiveX control, but that's a
> bigger deal.
Acrobat Reader can be used as a COM object thru its Internet Explorer plugin.
When you open a PDF directly in IE, the Document object is provided
by Acrobat.
import win32com.client, time
ie = win32com.client.Dispatch('InternetExplorer.Application')
ie.Visible=1
ie.Navigate('somedocument.pdf')
while ie.Busy:
time.sleep(1)
ie.Document.printPages(1,3)
Roger
More information about the Python-win32
mailing list