#1 Re: mORMot 2 » Quick Report To PDF supporting Arabic Fonts » 2023-06-27 11:33:41

igors233 wrote:

Can you get page in QR as Metafile (or EMF), if you can try to insert those with Canvas.RenderMetaFile.

I can't, i need only to export my quick report to pdf, with Arabic Fonts support;

#2 mORMot 2 » Quick Report To PDF supporting Arabic Fonts » 2023-06-27 05:37:56

MarwanAlmukh
Replies: 2

I have a quick report in delphi 11 which almost fonts are Arabic font, How can i export it to PDF. I try to use this but no success:
uses
  SynPDF;

// ...

var
  PDF: TPDFDocument;
  PDFCanvas: TPdfCanvas;
  i: Integer;
begin
  PDF := TPDFDocument.Create;
  try
    PDFCanvas := PDF.Canvas;
    PDFCanvas.SetSize(bitmap.Width, bitmap.Height);

    for i := 0 to FormCertify3.QuickRep2.QRPrinter.PageCount - 1 do
    begin
      PDFCanvas.DrawFormXObject(FormCertify3.QuickRep2.QRPrinter.GetPage(i + 1), 0, i * FormCertify3.QuickRep2.Height);
      if i < FormCertify3.QuickRep2.QRPrinter.PageCount - 1 then
        PDFCanvas.NextPage;
    end;

    PDF.SaveToFile('e:\EmailReport.pdf');
  finally
    PDF.Free;
  end;
end;

Board footer

Powered by FluxBB