[reportlab-users] open pdf

Andy Robinson andy at reportlab.com
Thu Jun 18 05:37:52 EDT 2009


2009/6/18 Robin Becker <robin at reportlab.com>:

> sudhakar samukham wrote:

> 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


The first one assumes you've installed acroread, which, being
non-free, requires a couple of extra steps; evince may be better as
it's in Ubuntu and other distros.

os.system("acroread "+pdfFilePath) #linux if you installed acroread
os.system("evince "+pdfFilePath) #linux (Ubuntu lightweight
viewer, installed by default)

On Mac it should be this, which will use whatever viewer app you have
configured.
os.system("open "+pdfFilePath) #mac

- Andy


More information about the reportlab-users mailing list