how to print pdf with python on a inkjet printer.
srikrishnamohan at gmail.com
Sun Nov 19 17:28:11 CET 2006
i dont see os.startfile in python2.5 installation on my system :-(
On 11/19/06, Thomas Heller <theller at ctypes.org> wrote:
> Gabriel Genellina schrieb:
> > At Friday 17/11/2006 17:40, Tim Roberts wrote:
> >> > double wow! as it is my customer wants me to print to the default
> >> > printer.
> >> > can you please help me with the command for rendering the pdf to the
> >> > printer with acrobat using python?
> >>You'll have to use the registry to find "acrord32", but once you find
> >>it, you just do:
> >> os.system( "\\Program Files\\Adobe\\Acrobat
> >>/p xxx.pdf" )
> >>The /p switch requests printing.
> > Or just let Windows do the dirty work of locating Adobe Reader,
> > figuring out the parameters and such:
> > import win32api
> > win32api.ShellExecute(0, "print", path/to/document.pdf, None, None, 0)
> Note that in Pyhton2.5, os.startfile was extended to accept an optional
> second parameter; so
> os.startfile(path/to/document.pdf, "print")
> should also work.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list