[reportlab-users] open pdf
Roberto Alsina
ralsina at netmanagers.com.ar
Thu Jun 18 06:26:48 EDT 2009
On Thursday 18 June 2009 06:27:56 Robin Becker wrote:
> 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
If there is a xdg-open program in the PATH, it's probably better to use it,
since there's no guarantee the user has acroread installed (could be using
okular, xpdf, evince, whatever)
>
> 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.
--
("\''/").__..-''"`-. . Roberto Alsina
`9_ 9 ) `-. ( ).`-._.`) KDE Developer (MFCH)
(_Y_.)' ._ ) `._`. " -.-' http://lateral.netmanagers.com.ar
_..`-'_..-_/ /-'_.' The 6,855th most popular site of Slovenia
(l)-'' ((i).' ((!.' according to alexa.com (27/5/2007)
"Our opponent is an alien starship packed with atomic bombs, I said.
We have a protractor. Okay, I’ll go home and see if I can scrounge up a
ruler and a piece of string." — Neal Stephenson
More information about the reportlab-users
mailing list