[reportlab-users] open pdf

Niki Spahiev niki.spahiev at gmail.com
Fri Jun 19 10:58:30 EDT 2009


Tim Roberts wrote:

> sudhakar samukham wrote:

>> I generated pdf using reportlab,upto here its ok,

>> the pdf is generated at specified location but when

>> want see the output in pdf ,I need to go the specified

>> location then open it manually by clicking on pdf.

>>

>> Here what i need is that when i run my script the pdf should

>> open automatically instead of not doing any manual opening.

>

> Which operating system? On Windows, you can just say:

> os.system( "start c:\\path\\to\\file\\document.pdf" )

> or

> subprocess.Popen( 'c:\\path\\to\\file\\document.pdf' )


use os.startfile on windows

Niki



More information about the reportlab-users mailing list