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


------------------------------------------------------------------------------
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to