Recent

Author Topic: fpreport: Rendering Report to Printer did not work on RasPi (arm-linux)  (Read 2633 times)

af0815

  • Hero Member
  • *****
  • Posts: 1289
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
« Last Edit: August 09, 2019, 01:05:18 pm by af0815 »
regards
Andreas

af0815

  • Hero Member
  • *****
  • Posts: 1289
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
regards
Andreas

af0815

  • Hero Member
  • *****
  • Posts: 1289
The same testapp compiled for QT5 widgetset on the Raspi prints correct.

Yes QT5 on RasPi works :-)
regards
Andreas

af0815

  • Hero Member
  • *****
  • Posts: 1289
regards
Andreas

nouzi

  • Sr. Member
  • ****
  • Posts: 296
Can Not find in OPM
« Last Edit: August 16, 2019, 03:50:43 pm by nouzi »
My English is  bad
Lazarus last version free pascal last version
Lazarus trunk  free pascal trunk 
System : Linux mint  64bit  Windows 7 64bit

af0815

  • Hero Member
  • *****
  • Posts: 1289
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
regards
Andreas

nouzi

  • Sr. Member
  • ****
  • Posts: 296
@af0815 thanks
My English is  bad
Lazarus last version free pascal last version
Lazarus trunk  free pascal trunk 
System : Linux mint  64bit  Windows 7 64bit

 

TinyPortal © 2005-2018