[Tutor] Re: Printing a PDF file
Sandip Bhattacharya
sandip at linux-delhi.org
Mon Feb 23 16:54:55 EST 2004
Shitiz Bansal wrote:
> Hi,
> Here is a simple code to print a word document programatically using python:
>
> from win32.client import Dispatch
> myWord = Dispatch('Word.Application
> myDoc=myWord.Documents.Add('filename')
> myDoc.PrintOut()
> myDoc.close()
>
> How do i make a similar program for printing a pdf doc (platform windows)
> please help
http://aspn.activestate.com/ASPN/docs/ActivePython/2.3/PyWin32/html/com/win32com/HTML/QuickStartClientCom.html
Use an object browser to find out the name of the COM object
corresponding to the Acrobat Reader app. Use that name instead of
"Word.Application" in the code above.
- Sandip
--
Sandip Bhattacharya
sandip (at) puroga.com
Puroga Technologies Pvt. Ltd.
Work: http://www.puroga.com Home: http://www.sandipb.net
GPG: 51A4 6C57 4BC6 8C82 6A65 AE78 B1A1 2280 A129 0FF3
More information about the Tutor
mailing list