i dont see os.startfile in python2.5 installation on my system :-(<br>
KM<br><br><div><span class="gmail_quote">On 11/19/06, <b class="gmail_sendername">Thomas Heller</b> <<a href="mailto:theller@ctypes.org">theller@ctypes.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Gabriel Genellina schrieb:<br>> At Friday 17/11/2006 17:40, Tim Roberts wrote:<br>><br>>> > double wow!  as it is my customer wants me to print to the default<br>>> > printer.<br>>> > can you please help me with the command for rendering the pdf to the
<br>>> > printer with acrobat using python?<br>>><br>>>You'll have to use the registry to find "acrord32", but once you find<br>>>it, you just do:<br>>>     os.system( "\\Program Files\\Adobe\\Acrobat 
7.0\\Reader\acrord32.exe<br>>>/p xxx.pdf" )<br>>>The /p switch requests printing.<br>><br>> Or just let Windows do the dirty work of locating Adobe Reader,<br>> figuring out the parameters and such:
<br>><br>> import win32api<br>> win32api.ShellExecute(0, "print", path/to/document.pdf, None, None, 0)<br>><br>Note that in Pyhton2.5, os.startfile was extended to accept an optional<br>second parameter; so
<br>  os.startfile(path/to/document.pdf, "print")<br>should also work.<br><br>Thomas<br><br>--<br><a href="http://mail.python.org/mailman/listinfo/python-list">http://mail.python.org/mailman/listinfo/python-list
</a><br></blockquote></div><br>