printing framework - Missing the basics

printing framework - Missing the basics?

Hi all,
I have tried to understand a mystery of wxPython's printing framework
but it seems I miss the basics or something. Please you guys help me
understand the ABCs of wxPrinting framework.

Tutorial ???

Thanks guys!

Have you seen Chapter 17 of the wxPIA book? There is also a recipe or two in Cody's Cookbook that touch on printing.

In a nutshell, if you can draw it on the screen then you can draw it on paper. The tricky parts is getting the scaling right and dealing with multiple page print jobs.

···

On 12/4/11 2:40 AM, branko wrote:

printing framework - Missing the basics?

Hi all,
I have tried to understand a mystery of wxPython's printing framework
but it seems I miss the basics or something. Please you guys help me
understand the ABCs of wxPrinting framework.

Tutorial ???

--
Robin Dunn
Software Craftsman

This is why I am still using ReportLab to generate PDFs, although lately I’ve been wanting to give Pisa a try since it takes HTML and converts that to a PDF: http://www.xhtml2pdf.com/

···

Mike Driscoll

Blog: http://blog.pythonlibrary.org

I tried doing a few reports with Xhtml2Pdf/Pisa recently. I ran into issues with seemingly basic things. That's when I discovered the documentation is minimal and the user group is largely inactive. My conclusion: it is essentially a dead project.

If you come to a different conclusion, I'd like to hear about it.

Michael

···

On 2011-12-05 10:07 AM, Mike Driscoll wrote:

This is why I am still using ReportLab to generate PDFs, although lately I've
been wanting to give Pisa a try since it takes HTML and converts that to a PDF:
http://www.xhtml2pdf.com/

Well, we had a presentation on the subject at our local Python Users Group a few months ago and he seemed to be doing some pretty cool stuff with it. I haven’t tried it myself as of yet. There’s also the rst2pdf project which I see updates on every couple months on the Reportlab website, so I know it’s not dead: http://code.google.com/p/rst2pdf/ I haven’t tried it either, but it’s also on my TODO list.

···

Mike Driscoll

Blog: http://blog.pythonlibrary.org

Try http://appyframework.org/pod.html

···

On Mon, 05 Dec 2011 17:07:30 +0100, Mike Driscoll <kyosohma@gmail.com> wrote:

This is why I am still using ReportLab to generate PDFs, although lately
I've been wanting to give Pisa a try since it takes HTML and converts that
to a PDF: http://www.xhtml2pdf.com/

If you're under Linux, give a try to wkhtmltopdf

···

On Mon, 05 Dec 2011 10:13:23 -0600 Michael Hipp <michael@redmule.com> wrote:

I tried doing a few reports with Xhtml2Pdf/Pisa recently. I ran into issues
with seemingly basic things. That's when I discovered the documentation is
minimal and the user group is largely inactive. My conclusion: it is
essentially a dead project.

--
Progress might have been all right once, but it's gone on too long.
    -- Ogden Nash

Le 05/12/2011 17:26, Jean-Yves F. Barbier a �crit :

···

On Mon, 05 Dec 2011 10:13:23 -0600 > Michael Hipp<michael@redmule.com> wrote:

I tried doing a few reports with Xhtml2Pdf/Pisa recently. I ran into issues
with seemingly basic things. That's when I discovered the documentation is
minimal and the user group is largely inactive. My conclusion: it is
essentially a dead project.

If you're under Linux, give a try to wkhtmltopdf

Now I use "wkhtmltopdf" under Linux and under Windows instead of "wx.html.HtmlPrintout" and it works well ...

--

Hugues JEAN-BAPTISTE (hjb@agorinfo.fr)
AGORINFO S.A.S. (http://www.agorinfo.fr)

From all program I tested this one's the best, even on complicated
pages.

···

On Mon, 05 Dec 2011 17:35:45 +0100 Hugues JEAN-BAPTISTE <hjb@agorinfo.fr> wrote:

> If you're under Linux, give a try to wkhtmltopdf
>
Now I use "wkhtmltopdf" under Linux and under Windows instead of
"wx.html.HtmlPrintout" and it works well ...

--
Hell is empty and all the devils are here.
  -- Wm. Shakespeare, "The Tempest"

Hello,
What about: http://www.geraldoreports.org/

Anyone test it? looks very well ... any opinions?

Saludos / Best regards

Mario Lacunza
Email:: mlacunza@gmail.com
Personal Website:: http://www.lacunza.biz/
OpenOffice.org:: http://es.openoffice.org/
OpenOffice.org Perú:: http://openoffice-peru.com/
Hosting:: http://mlv-host.com/
Mascotas Perdidas:: http://mascotas-perdidas.com/
Google Talk: mlacunzav Skype: mlacunzav
MSN: mlacunzav@hotmail.com Y! messenger: mlacunzav

···

On 05/12/11 11:44, Jean-Yves F. Barbier wrote:

On Mon, 05 Dec 2011 17:35:45 +0100 > Hugues JEAN-BAPTISTE<hjb@agorinfo.fr> wrote:

If you're under Linux, give a try to wkhtmltopdf

Now I use "wkhtmltopdf" under Linux and under Windows instead of
"wx.html.HtmlPrintout" and it works well ...

> From all program I tested this one's the best, even on complicated
pages.

and this one: http://pythonreports.sourceforge.net/

any comments?

Saludos / Best regards

Mario Lacunza
Email:: mlacunza@gmail.com
Personal Website:: http://www.lacunza.biz/
OpenOffice.org:: http://es.openoffice.org/
OpenOffice.org Perú:: http://openoffice-peru.com/
Hosting:: http://mlv-host.com/
Mascotas Perdidas:: http://mascotas-perdidas.com/
Google Talk: mlacunzav Skype: mlacunzav
MSN: mlacunzav@hotmail.com Y! messenger: mlacunzav

Check out Dabo's report writer - very nicely done.
http://dabodev.com/

Malcolm

I have used geraldo. It’s kind of like Crystal Reports, but without the GUI. It’s pretty powerful, but there’s not a lot of documentation.

···

Mike Driscoll

Blog: http://blog.pythonlibrary.org

In my understanding, the question was about how to print
directly from wx and RD gave an answer.

···

----

Now, if the goal is to generate a pdf. My preferred way
would be to generate a .tex (LaTeX) plain text file.
This is, de facto, a somehow pdf ready file.

The rst2pdf doc says: "Supports TTF and Type1 font embedding."
This just means, it is not unicode compliant.

Bonus. Having to learn how to generate a .tex file (a plain
text file), just means also learning TeX. A tool is worth to
know.

jmf

If you don't mind spaghetti code, you can check out my attempts at
using the print framework in the wx demo modules. The demo is
TablePrint.

The main print code is in the libary -> wx.lib.printout

It's been a long time, but I did successfully use those printing
concepts to build a contact management program which printed address
and name labels, envelopes, Dayrunner formats, etc.

As was already suggested, you have to manage the scale carefully and
manage when your page is out of room to move the next group of lines
objects to the next page.

Lorne White

I did some experiments with it for a while. It has a lot of capabilities but it has some underlying assumptions that broke for my application. Namely that each report has one and only one data source. I couldn't find any way to do a report with two tables having different columns and data.

But Geraldo is definitely worth a look. It is a pretty nice abstraction above ReportLab.

Michael

···

On 2011-12-05 11:20 AM, Mario Lacunza wrote:

Hello,
What about: http://www.geraldoreports.org/

Anyone test it? looks very well ... any opinions?

The problem with all these tools is that there are Python
dependent.

Producing a plain text, can be a .html file or a .tex file
(for .pdf) requires only the knowlege of Python and the
structure of these text files.

I can probably generate such documents in ten years as
I can do now. And today, I can still produce documents in
the same way as I have done years ago. With the
advantage I can touch them in an independent way.

Other variants: PostScript, Lout files.

jmf

···

On 5 déc, 18:20, Mario Lacunza <mlacu...@gmail.com> wrote:

Hello,
What about:http://www.geraldoreports.org/

Anyone test it? looks very well ... any opinions?

Hello,
What about:http://www.geraldoreports.org/

Anyone test it? looks very well ... any opinions?

The problem with all these tools is that there are Python
dependent.

Why would that be a problem for an application which is written in Python?

Producing a plain text, can be a .html file or a .tex file
(for .pdf) requires only the knowlege of Python and the
structure of these text files.

I get the impression that you don't look at these tools as "report" generators. Maybe that is not what the OP is looking for either, didn't follow this thread too much but found the different links for Python report generators interesting.

Producing a text (using whatever tool) and producing "reports" is in my view two different things.

I expect that a report tool deals with page breaks, groupings, handles sub-reports etc etc automagically and I have no desire to re-invent that wheel by writing something.

Just my 0.02�

Werner

···

On 12/06/2011 10:09 AM, jmfauth wrote:

On 5 d�c, 18:20, Mario Lacunza<mlacu...@gmail.com> wrote: