[Gambas-user] Landscape printing in PDF goes wrong
Rolf-Werner Eilert
rwe-sse at osnanet.de
Thu Jan 10 13:02:46 CET 2019
Am 19.12.18 um 15:03 schrieb Gianluigi:
>
>
> Il giorno mer 19 dic 2018 alle ore 11:43 Rolf-Werner Eilert
> <rwe-sse at osnanet.de <mailto:rwe-sse at osnanet.de>> ha scritto:
>
> Am 18.12.18 um 16:56 schrieb Rolf-Werner Eilert:
> > In one of my programs which ran flawlessly under Suse Leap (KDE
> and Qt),
> > I have a serious fault of printing functionality under my new
> Ubuntu Mate.
> >
> > Instead of printing Landscape, it prints Portrait, but
> landscape-wise on
> > the paper, i. e. upright. If I would print it, it would be ok,
> but the
> > positions on the sheet are wrong. It looks like being measured
> for A5
> > instead of A4.
> >
> > This is Gambas 3.11.4. Have you changed anything in the printing
> part
> > which would influence measuring positions etc.? Something during
> the few
> > last versions; on the Suse system I had a bit older version.
> >
> > Or is there something wrong here?
> >
> > drucker = New Printer As "drucker"
> >
> > drucker.Orientation = Printer.Landscape
> > drucker.Paper = Printer.A4
> >
> > drucker.OutputFile = druckPlanDatei
> >
> > drucker.FullPage = True
> >
> > drucker.Print() ' -> drucker_Begin()
> >
> > Thank you for any input!
> >
> > Regards
> > Rolf
> >
>
>
> I have to answer myself as I have found a way to work around the wrong
> measurement. Sizes are ok now, but the print is still not turned by 90°
> for Landscape.
>
> The whole thing is somewhat strange as I use the same code in another
> program to compute the positions for printing.
>
> How do you calculate mm to printing pixels?
>
> Regards
> Rolf
>
>
> Sorry but now I have no time, it's something I had done years ago is in
> Italian, I hope can help you.
>
> Regards
> Gianluigi
>
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
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
More information about the User
mailing list