Lazarus

Programming => Packages and Libraries => Lazarus Extra Components => Topic started by: af0815 on August 09, 2019, 11:58:25 am

Title: fpreport: Rendering Report to Printer did not work on RasPi (arm-linux)
Post by: af0815 on August 09, 2019, 11:58:25 am
I have created a report with fpreport (in code) and it works on Windows (32-bit app) with Rendering to LCLCanvas, PDF  and Printer without problems.

On a RasPi with rasbian (on Jessy, Wheezy the same) rendering to LCLCanvas and PDF works, but on printer it shows not the text. pictures are correct rendered. The text is not rendered or only some points, except the footerband.

I have dived a little into fpreport and found out, it must have to do with Canvas.Textout in TFPReportExportCanvas.RenderMemo.
The parameters of Canvas.TextOut are imho correct, but not the rendered result. If i change Canvas.TextOut to Canvas.TextRect (as in designmode) and use the same parameters, the text is written to the printer.

it looks like something goes wrong on arm-linux with Canvas.TextOut.

Any hint for me ?

Regards
 
Edit i am using fpc fixes32 (42593) and Laz Fixes20 (61645)

Edit2: I have extended the fpreport sample (from lazarus/examples/fpreport) and it shows the same issue on a RasPi. So it doesnt depend on my app. I do normally a crosscompile from windows to raspi
Title: Re: fpreport: Rendering Report to Printer did not work on RasPi (arm-linux)
Post by: af0815 on August 12, 2019, 04:00:41 pm
The error is in rendering, i attach the resulting PS file.  I have created it, with the debuggingmodus of printers4lazarus. And in the file you see the Text "Hello world <Item xx>" is written correct, but ? overwritten. 

Quote
BT
10 0 0 10 73.679688 280.32125 Tm
/f-0-0 1 Tf
(Hello world <Item 15>.)Tj
ET
0.537255 0.717647 0.917647 rg
56.641 289.321 m 304.68 289.321 l 304.68 260.88 l 56.641 260.88 l h
56.641 260.88 m 304.68 260.88 l 304.68 232.56 l 56.641 232.56 l h
56.641 260.88 m f
0 g
BT
10 0 0 10 73.679688 251.879844 Tm
/f-0-0 1 Tf
(Hello world <Item 16>.)Tj
ET
0.537255 0.717647 0.917647 rg
56.641 260.88 m 304.68 260.88 l 304.68 232.56 l 56.641 232.56 l h
56.641 232.56 m 304.68 232.56 l 304.68 204.239 l 56.641 204.239 l h
56.641 232.56 m f
0 g
Title: Re: fpreport: Rendering Report to Printer did not work on RasPi (arm-linux)
Post by: af0815 on August 12, 2019, 08:30:35 pm
The same testapp compiled for QT5 widgetset on the Raspi prints correct.

Yes QT5 on RasPi works :-)
Title: Re: fpreport: Rendering Report to Printer did not work on RasPi (arm-linux)
Post by: af0815 on August 16, 2019, 09:35:04 am
Reported under https://bugs.freepascal.org/view.php?id=35973
Title: Re: fpreport: Rendering Report to Printer did not work on RasPi (arm-linux)
Post by: nouzi on August 16, 2019, 03:17:48 pm
Can Not find in OPM
Title: Re: fpreport: Rendering Report to Printer did not work on RasPi (arm-linux)
Post by: af0815 on August 16, 2019, 04:39:32 pm
Is not in OPM, but in Lazarus/components. See https://wiki.freepascal.org/FPReport_Lazarus_support. But aware, must must have a FPC  fixes 32 or trunk to use the package. And Lazarus must be fixes20 or trunk.

The designer (not used in my sample) is also there. Wiki https://wiki.freepascal.org/FPReport_Designer
Title: Re: fpreport: Rendering Report to Printer did not work on RasPi (arm-linux)
Post by: nouzi on August 16, 2019, 06:35:31 pm
@af0815 thanks
TinyPortal © 2005-2018