[Gambas-user] Bug in class Printer of gb.Qt component

Benoit Minisini gambas at ...1...
Tue Jan 23 22:23:03 CET 2007


On Tuesday 23 January 2007 21:41, timothy wrote:
> > -----Original Message-----
> > From: gambas-user-bounces at lists.sourceforge.net [mailto:gambas-user-
> > bounces at lists.sourceforge.net] On Behalf Of Leonardo Miliani
> > Sent: Tuesday, 23 January 2007 03:04 PM
> > To: mailing list for gambas users
> > Subject: [Gambas-user] Bug in class Printer of gb.Qt component
> >
> > I think there is a bug inside the class Printer of the gb.Qt
>
> component.
>
> > This bug is manifest both in an application of mine and in the
>
> Printing
>
> > example too.
> >
> > Try to print any document, designed by yourself using the class Draw
>
> of
>
> > by printing any test of Printing example and, in the Printer.setup
> > dialog window, choose a number of copies greater than 1: you'll obtain
>
> a
>
> > blank document composed of only 1 page.
> > I get this bad way of working printing directly to the printer or to a
> > file too.
> >
> > THe only way I discovered to print multiply pages of the same document
> > is to choose 1 copy for Printer.copies and then draw my document
>
> several
>
> > times using the class Draw.
> >
> > --
> > Ciao.
> > Leo.
>
> Hello,
>
> Yes the printing example does ignore the Copies property. It also
> ignores the FromPage and ToPage and a few other properties.
>
> And you already know the answer. If you need these options then you need
> to handle these properties in your code.
>
> I do not think any other development environment would do these things
> for you. So you would have the same problem no matter what language you
> used.
>
> Thanks
>
> 8-{)} Timothy Marshal-Nichols
> <mailto: timothy.marshal-nichols at ...247...>
>

The printing support of QT 3 is not very good (it is better in QT 4 
apparently). 

So the better way to print is to do all you need by hand and send it to a 
postcript file. Then run a command yourself with SHELL to send the postcript 
file to the printer (for example with KDE you can use kprinter).

I think I will remove the printing to a printer support in the component for 
these reasons.

Regards,

-- 
Benoit Minisini




More information about the User mailing list