[Lazarus] Printing on Raspberry Pi

Koenraad Lelong lazarus2 at de-brouwerij.be
Wed Apr 6 12:56:51 CEST 2016


Op 05-04-16 om 21:00 schreef ahiggins:
> Not sure if you resolved the missed align data error (im coming to the party
> late), today i have had the same problem, now below is the crude mod i did
> to get it working for me, not sure if it will help your problem but worth a
> try.
>
> LR_Prntr unit. around line 1042
>
> // screen sizes
>        Pgw :=
> round((PaperSize.PaperRect.PhysicalRect.Right-PaperSize.PaperRect.PhysicalRect.Left)
> * kx);
>        //Pgw := round(PPgw * kx);
>        Pgh :=
> round((PaperSize.PaperRect.PhysicalRect.Bottom-PaperSize.PaperRect.PhysicalRect.Top)
> * ky);
>        //Pgh := round(PPgh * ky);
>        Ofx := round(PaperSize.PaperRect.WorkRect.Left * kx);
>        //Ofx := round(POfx * kx);
>        Ofy := round(PaperSize.PaperRect.WorkRect.Top * ky);
>        //Ofy := round(POfy * ky);
>        Pw  :=
> round((PaperSize.PaperRect.WorkRect.Right-PaperSize.PaperRect.WorkRect.Left)
> * kx);
>        //Pw  := round(PPw  * kx);
>        Ph  :=
> round((PaperSize.PaperRect.WorkRect.Bottom-PaperSize.PaperRect.WorkRect.Top)
> * ky);
>        //Ph  := round(PPh  * ky);
>
>
> kind regards
>
> Tony
Hi Tony,

If you had looked at the bug-tracker, you would have found a solution 
;-) Maybe I should have posted it here also.
I used an intermediate variable, because a type-cast crashed the 
application :
//      Pgw := round(PPgw * kx);  Does not work on Pi
       tmp1:=PPgw;
       Pgw:=round(tmp1 * kx);
etc. where tmp1 is a longint.
I find my solution also a hack, but it works so I'm satisfied.

Koenraad.





More information about the Lazarus mailing list