[reportlab-users] open pdf

Robin Becker robin at reportlab.com
Thu Jun 18 05:27:56 EDT 2009


sudhakar samukham wrote:

> Hi everyone,

>

> 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.

>

> Thanks in advance.

>

> With regards

> S Sudhakar.

>

.......
This looks more like a problem for the python list. Depending on your operating
system what the script needs to do is something like

os.system("acrord "+pdfFilePath) #linux

or

os.system("start "+pdfFilePath) #windows


somewhere after the pdf file is created and the file closed. The windows version
definitely detaches from the current process so that the script can continue.
--
Robin Becker


More information about the reportlab-users mailing list