From: Nick J. <sk...@er...> - 2003-05-05 13:17:59
|
On Mon, 5 May 2003, Mark Wardell wrote: > Hi All, > > I have been trying to implement printing in wxPerl. I tried running the > printing module in the samples but it crashes on my machine (no Perl > error) when I try and preview. The print button does not seem to do > anything at all. > > Has anyone else experienced the same or got the demo to work lately? > Does anyone have a working sample/snippet of code. I have also looked at > the printing.cpp sample from the wxWindows source for a guide for my > application but I keep getting this same crash. > > I am using wxPerl 0.14 (I tried 0.13 but with same problems), wxWindows > 2.4, AS Perl 5.8.805 > I haven't used the demo to print, but I have used Wx::HtmlEasyPrinting and that worked fine. It was with wxPerl 0.12 and ActivePerl 5.6 though so YMMV. Try Wx::HtmlEasyPrinting. I don't have a snippet to hand but I thought it was very simple. AFAIK you just supply it with HTML code, either as a string or filename and it prints that. Obviously it uses Wx::Html to render but it does a reasonable job (even includes basic table support). I think the total code to print something with that class was about 3 lines. It really does make it easy, I was *very* impressed. - Nick |