[reportlab-users] open pdf

Tim Roberts timr at probo.com
Thu Jun 18 13:09:49 EDT 2009


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' )

Remember, however, that your script cannot overwrite the file while
Acrobat has it open.

--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the reportlab-users mailing list