[reportlab-users] Help to Auto open generated pdf files

T. Kort nospam at banza.net
Sun Jun 29 06:46:58 EDT 2014


Hello

This is not a reportlab problem and would fit better to
http://stackoverflow.com/ or similar sites. You need something like
this:

        import sys, os, subprocess
        if sys.platform.startswith('darwin'):
            subprocess.call(('open', path))
        elif os.name == 'nt':
            os.startfile(path)
        elif os.name == 'posix':
            subprocess.call(('xdg-open', path))

Regards, T.


On Sun, 29 Jun 2014 10:40:01 +0100
Umar Yusuf <forum2k9 at gmail.com> wrote:

> Good day,
> I am able to generate .PDF files with python and report lab using the
> tutorials available.
> 
> My question is how do I make a generated PDF to auto open immediately
> it is generated from my script?
> 
> I don't want it to generate only, but to also open in a default PDF
> reader.
> 
> 
> Thanks for helping in advance.



More information about the reportlab-users mailing list