FPReport QRCode lazarus / 5-Lazarus Extra Components ---------------------------------------------------------------------- dseligo · 2024-09-15 21:33 I am exporting generated FPReport to PDF, but I have problems with QRcode - sometimes there are some glitches around and in the QRCode. Example is attached PDF (generated from attached program) and image (from more complex report). These glitches somehow depends on other report elements. I also noticed that when I turn on 'Use Heaptrc unit (check for mem-leaks)', glitches disappear. In my program they don't appear on first run of the report, but on 2nd and subsequent runs of report. Am I using TFPReportQRCode in the wrong way or is there some bug in this class? This is happening under Lazarus 3.4 under Windows 11, but also with Lazarus 2.2.4 on Android (LAMW). Here is the test program (I attached Lazarus project): Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program project1; uses  SysUtils, LCLIntf, fpreport, fpreportqrcode, fpreportpdfexport; var report: TFPReport;    page: TFPReportPage;    header: TFPReportPageHeaderBand;    title: TFPReportTitleBand;    exporter: TFPReportExporter;    qrCode, qrCode2: TFPReportQRCode; begin  if PaperManager.PaperCount = 0 then    PaperManager.RegisterStandardSizes;   report := TFPReport.Create(nil);  try    page := TFPReportPage.Create(report);  page.Orientation := poPortrait;    page.PageSize.PaperName := 'A4';  page.Margins.Left := 20;    page.Margins.Top := 20;    page.Margins.Right := 20;    page.Margins.Bottom := 20;    page.Font.Name := 'LiberationSans';     header := TFPReportPageHeaderBand.Create(page);    header.Layout.Height := 50;     qrCode := TFPReportQRCode.Create(header);    qrCode.Layout.Top := 0;    qrCode.Layout.Left := 15;    qrCode.Layout.Width := 38;    qrCode.Layout.Height := 38;    qrCode.Value := 'abcde12345abcde12345abcde12345abcde12345abcde12345';    qrCode.Center := True;     title := TFPReportTitleBand.Create(page);    title.Layout.Height := 50;     qrCode2 := TFPReportQRCode.Create(header);    qrCode2.Layout.Top := 0;    qrCode2.Layout.Left := 60;    qrCode2.Layout.Width := 38;    qrCode2.Layout.Height := 38;    qrCode2.Value := 'abcde12345abcde12345abcde12345abcde12345abcde12345';    qrCode2.Center := True;     report.RunReport;    exporter := TFPReportExportPDF.Create(nil);    exporter.SetFileName('test.pdf');  report.RenderReport(exporter);  finally    exporter.Free;    report.Free;  end;   OpenDocument('test.pdf');end.