[Gambas-user] About Printer
Benoît Minisini
gambas at ...1...
Tue Jul 19 15:13:17 CEST 2011
> > >
> > > 'Set scale
> > > wFactor = prtPrinter.PaperWidth / Paint.Width
> > > hFactor = prtPrinter.PaperHeight / Paint.Height
> > > Paint.Scale(wFactor, hFactor)
> > >
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.
--
Benoît Minisini
More information about the User
mailing list