[Gambas-user] About Printer

M. Cs. mohareve at ...626...
Tue Jul 19 15:33:05 CEST 2011


Please don't forget to publish your working solution. We've spent 3
days with Fabian in private investigations with the printing and at
the and I have a nearly working solution for the printing. The
emphasis is on the word NEARLY. There are still problems with some
pixel constraints.
Printing is everything but easy in gambas. This is the first time for
me to hear about
prtPrinter.FullPage option, so please, PLEASE, give us tested and
explained examples.

2011/7/19, Demosthenes Koptsis <demosthenesk at ...626...>:
> 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 at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>




More information about the User mailing list