[Gambas-user] Landscape printing in PDF goes wrong
Rolf-Werner Eilert
rwe-sse at osnanet.de
Fri Jan 11 13:48:38 CET 2019
Am 11.01.19 um 13:08 schrieb Benoît Minisini:
> Le 10/01/2019 à 13:02, Rolf-Werner Eilert a écrit :
>>
>> Happy New Year guys!
>>
>> Just FYI, purely coincidentally I found the solution: It depends on
>> the graphical libraries you bind your project to.
>>
>> In this project, I had gb.gui, and that didn't work out correctly
>> (myPrinter.Resolution delivers a faulty value). In another project, I
>> had gb.qt4 instead, and it runs flawlessly.
>>
>> When I changed to gb.qt4, calculation was correct again.
>>
>> Regards
>> Rolf
>>
>
> What do you mean exactly by "myPrinter.Resolution delivers a faulty
> value" ?
>
You are right. Now that I'm thinking about it, it is probably not
Printer.Resolution but the way the other functions are calculating their
positions such as MoveTo, LineTo etc.
For the calculation of mm to printing pixels I use a function based on
Printer.Resolution.
When I use gb.gui, line drawing etc. goes completely wrong. I had to
fake a resolution of "60" to get proper positions here.
When I use gb.qt4, all positions are drawn correctly.
So yes, it is NOT Printer.Resolution, but the drawing functions.
Regards
Rolf
More information about the User
mailing list