reporting with wx python, is it possible?

krishnakant Mane wrote:

hello,
I need to create reports (pdf) in my wxpython application which is
connected to database. I may use report lab for creating pdf but can
I display the same in my wxpython based gui with the help of some
control?

There is currently no wxPython object that I'm aware of that will display a PDF in it, that doesn't require Windows and Adobe Acrobat.

is there any other way out (may be an off topic solution?)
for example if I call the default webbrowser from my python app will
it open the pdf file?

It may in most cases, but you can't depend on it. The user would need to have a PDF reader installed, and the web browser would have to know to use that PDF reader for pdf files. If I had to guess, I'd say that 85% of Windows installations would do the right thing, 95% of Mac installations, and perhaps as low as 65% of Linux installations.

will it also happen in linux just like internet explorer opens acrobat
reader for pdf?

If the browser on Linux knows a program to display PDF's, yes.

I know it might sound off topic but im really in need of a solution.

wxPython really needs a wxPDFWindow that doesn't have non-free dependencies.

···

--
pkm ~ http://paulmcnett.com

There is currently no wxPython object that I'm aware of that will display
a PDF in it, that doesn't require Windows and Adobe Acrobat.

   Having acroread or xpdf (or your favorite pdf viewer) open to display the
report is no more upsetting or unusual to the user of a wxPython application
than it does with anything else. In firefox, when you select a pdf from a
Google hit, you have the option of viewing it in your designated viewer or
saving it to disk. It does not display within the firefox tab.

   Same thing with OO.o, scribus, pine, or other applications. They do their
thing and they let pdf viewers do theirs. In short, there's no need to try
to build that functionality into the wxPython app.

   If you really want to display the output within the application, figure
out how to use the wxPrinting suite and call it separately from ReportLabs.

wxPython really needs a wxPDFWindow that doesn't have non-free dependencies.

   That double negative gives me pause.

Rich

···

On Sun, 18 Mar 2007, Paul McNett wrote:

--
Richard B. Shepard, Ph.D. | The Environmental Permitting
Applied Ecosystem Services, Inc. | Accelerator(TM)
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863

Werner F. Bruhin wrote:

Hi Rich,

Rich Shepard wrote:

...
than it does with anything else. In firefox, when you select a pdf from a
Google hit, you have the option of viewing it in your designated viewer or
saving it to disk. It does not display within the firefox tab.

FWIW, I have Firefox 2.0.2 and Acrobat Reader 7.x and it does open in a tab and I don't recall having made any special settings.

Ok, but for the record that quote was misattributed: I never said that!

···

On Sun, 18 Mar 2007, Paul McNett wrote:

--
pkm ~ http://paulmcnett.com