[Gambas-user] About Printer
Demosthenes Koptsis
demosthenesk at ...626...
Tue Jul 19 15:26:19 CEST 2011
On Tue, 2011-07-19 at 15:13 +0200, Benoît Minisini wrote:
> > > >
> > > > 'Set scale
> > > > wFactor = prtPrinter.PaperWidth / Paint.Width
> > > > hFactor = prtPrinter.PaperHeight / Paint.Height
> > > > Paint.Scale(wFactor, hFactor)
> > > >
>
Ok, i took this example from this page
http://www.gambasdoc.org/help/howto/print?v3
i think there is also inverted the scale factors.
> I'm stupid, the scale factors must be inverted!
>
> wFactor = Paint.Width / prtPrinter.PaperWidth
> hFactor = Paint.Height / prtPrinter.PaperHeight
> Paint.Scale(wFactor, hFactor)
>
> And prtPrinter.FullPage must be set to TRUE before calling prtPrinter.Print.
> Otherwise, Paint.Width and Paint.Height will take the margins into account.
>
--
Regards,
Demosthenes
More information about the User
mailing list