[python-win32] Re: Automating IE

Tim Golden tim.golden at viacom-outdoor.co.uk
Thu Feb 26 04:31:08 EST 2004


>-----Original Message-----
>From: Thomas Heller [mailto:theller at python.net]
>Sent: 26 February 2004 09:26
>To: python-win32 at python.org
>Subject: [python-win32] Re: Automating IE
>
>
>Tim Golden <tim.golden at viacom-outdoor.co.uk> writes:
>
>> Shitiz Bansal [mailto:shitizb at yahoo.com]
>>
>>> Hi,
>>> Thanx, ur code worked out.
>>> However it didnt solve my problem.
>>> Actually I was trying to print a pdf file 
>>> programatically and copied the following code from internet
>>
>> [... snip code ...]
>>
>> If all you're trying to do is to to print from Acrobat,
>>  then (at least on Acro4) you can call the reader executable
>>  (acrord32.exe) you can pass a command-line switch of /p,
>>  meaning print, or /t, meaning print to default printer.
>>
>> However, I believe that these switches are being deprecated
>>  in later versions, so your mileage may vary.
>>
>> Example:
>>
>> "c:\program files\adobe\Acrobat 4.0\Reader\acrord32.exe" /p doc.pdf
>>
>
>Or, call ShellExecute directly.
>
>from ctypes import *
>windll.shell32.ShellExecuteA(None, "print", "doc.pdf", None, None, 0)
>
>See also:
><http://msdn.microsoft.com/library/en-us/shellcc/platform/shell
/reference/functions/shellexecute.asp>

Thomas

Funnily enough, I had that same idea about 10 seconds after I
 sent the email, but decided not to clutter the list up with
 more of my ramblings.
Oops. I've done it anyway.

TJG

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________



More information about the Python-win32 mailing list