[reportlab-users] display report without writing to disk

Uwe C. Schroeder reportlab-users@reportlab.com
Sat, 9 Oct 2004 23:07:03 -0700


=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Saturday 09 October 2004 09:40 pm, Tim Smith wrote:
> Tim Roberts wrote:
> > On Thu, 07 Oct 2004 09:36:56 +1000, Tim Smith <tims@cqpl.com.au> wrote:
> >> is there a way to just display my report before writing it to file?
> >> i'd be using wxpython as my gui.
> >
> > Not easily.  You could probably pipe it into GhostScript, but it's a
> > lot easier to write it to a file and automatically invoke the Acrobat
> > Reader.  I use Acrobat as my "print preview".
> >
> > The only downside is that Acrobat keeps the file open while it is
> > being displayed, so you cannot overwrite it.  You have to close the
> > document before each run.
>
> can you give me an example of how you call acrobat?

on win32 just use

os.startfile(filename)

This call will use the OS registrated application for that filetype.
Win usually determines the filetype by extension, so if you create a tempor=
ary=20
file make sure it has the right extension (.pdf)

	UC

=2D --
Open Source Solutions 4U, LLC	2570 Fleetwood Drive
Phone:  +1 650 872 2425		San Bruno, CA 94066
Cell:   +1 650 302 2405		United States
=46ax:    +1 650 872 2417
=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFBaNGHjqGXBvRToM4RArt3AJ4rqzj7ed2yQBVnZF4KMoW7xN9aqgCfeyuf
RV6j+SQ7f5/7EuVfxOi3Eks=3D
=3Dj/rT
=2D----END PGP SIGNATURE-----