O sluție simplă pentru evitarea problemelor la exportul cu FlexCell în PDF din aplicațiile care rulează pe Android

Hi,

This is how I solved the problem of "lost" fonts in the Excel file from which I generate a report with Flexcel.

Step 1: Add the Roboto font to the project
Step 2: add the line of code:
pdf.FallbackFonts := 'Roboto':

TThread.Synchronize(nil, procedure

      begin

        try

          xls.Save(DestinationPath+ FileName + '.xls');

          Pdf := TFlexCelPdfExport.Create(xls, true);

          pdf.FallbackFonts := 'Roboto';  //The line of code that saved me when exporting to PDF from an app running on Android!

          Pdf.Export(DestinationPath+ FileName + '.pdf'); // DestinationPath, FileName -  strings

        except on e: exception do  ShowMessage('Error generating pdf file: '+e.Message);

        end;

      end);

With respect,
Grigore