Hiding popup from wx.Printer.Print() or page break

In generating a long printout using wx.html.HtmlPrintout() I'm having to call wx.Printer.Print() multiple times (once for each page). No problem, except it puts up this annoying little "Cancel" popup every time. Is there any way to disable the popup?

Alternatively, and better yet, is there some way to insert a page break into the HTML printout so I don't have to do this page-by-page silliness?

I tried the trick of

   style="page-break-before: always"

But it does not seem to work. I'm guessing the HTML support in wx is not CSS2 compliant.

Michael

Michael Hipp a écrit :

In generating a long printout using wx.html.HtmlPrintout() I'm having to call wx.Printer.Print() multiple times (once for each page). No problem, except it puts up this annoying little "Cancel" popup every time. Is there any way to disable the popup?

Alternatively, and better yet, is there some way to insert a page break into the HTML printout so I don't have to do this page-by-page silliness?

I tried the trick of

  style="page-break-before: always"

But it does not seem to work. I'm guessing the HTML support in wx is not CSS2 compliant.

Michael

Hi Michael,

I have no response for the first question ...
But, for the second, I have tested and used successfully :

<div style="page-break-before:always"> </div>

Python 2.3.4 and wxPython 2.6.1.0 on WinXP and Mandriva 10.1

Friendly.

···

--

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

Hugues JEAN-BAPTISTE wrote:

Michael Hipp a écrit :

Alternatively, and better yet, is there some way to insert a page break into the HTML printout so I don't have to do this page-by-page silliness?

I have no response for the first question ...
But, for the second, I have tested and used successfully :

<div style="page-break-before:always"> </div>

Python 2.3.4 and wxPython 2.6.1.0 on WinXP and Mandriva 10.1

Hugues, thank you ever so much! That works splendidly.

Right after I posted that message I found this page:

http://wxwidgets.org/manuals/2.6.3/wx_wxhtml.html#htmltagssupported

which purports to list all the tags supported by HTML classes in wx, but 'style' is not mentioned under 'div' or any other tag. In fact "style" does not appear anywhere on that page. Evidently that page is out of date.

But I'm glad to know it works, regardless.

Thanks,
Michael

Michael Hipp wrote:

Hugues JEAN-BAPTISTE wrote:

Michael Hipp a écrit :

Alternatively, and better yet, is there some way to insert a page break into the HTML printout so I don't have to do this page-by-page silliness?

I have no response for the first question ...
But, for the second, I have tested and used successfully :

<div style="page-break-before:always"> </div>

Python 2.3.4 and wxPython 2.6.1.0 on WinXP and Mandriva 10.1

Hugues, thank you ever so much! That works splendidly.

Right after I posted that message I found this page:

wxHTML overview

which purports to list all the tags supported by HTML classes in wx, but 'style' is not mentioned under 'div' or any other tag. In fact "style" does not appear anywhere on that page. Evidently that page is out of date.

Styles attributes (and any css for that matter) are not supported by wxHTML. The "<div style="page-break-before:always">" string is simply hard-coded in there to add the page break feature.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!