Re: Help to Auto open generated pdf files

"T. Kort" <[email protected]>
Newsgroups gmane.comp.python.reportlab.user
Message-ID <[email protected]>
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 <[email protected]> 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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.