Right to left columns in PdfGrid

In right-to-left languages column order should be from right-to-left.

Is it possible to instruct syncfusion to automatically place cell text taking that into consideration?

That is, instead of developer calculating reverse indexes in cells let Syncfusion library figure it out on its own?


        public static void RightToLeftGrid()

        {

            Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("ar");

            using (PdfDocument pdfDocument = new PdfDocument())

            {

                const float pageMargins = 15;

                var section = pdfDocument.Sections.Add();

                var pdfPage = section.Pages.Add();

                section.PageSettings.SetMargins(pageMargins);

                pdfDocument.PageSettings.SetMargins(pageMargins);


                // Is there automatic way

                PdfGrid grid = new PdfGrid();

                grid.Columns.Add(2);

                grid.Rows.Add();

                grid.Rows[0].Cells[0].Value = "Left for European, Right for Arabic";

                grid.Rows[0].Cells[1].Value = "Right for European, Left for Arabic";


                var layoutFormat = new PdfLayoutFormat { Break = PdfLayoutBreakType.FitPage, Layout = PdfLayoutType.Paginate };

                grid.Draw(pdfPage, new PointF(0, 0), layoutFormat);

                string fileName = $"File{DateTime.Now.Ticks}.pdf";

                pdfDocument.Save(fileName);

                pdfDocument.Close(true);

                Process.Start(fileName);

            }

        }


1 Reply 1 reply marked as answer

GK Gowthamraj Kumar Syncfusion Team February 7, 2022 01:36 PM UTC

Hi umlprog, 
  
No. It is not possible to automatically formatting the grid cell texts (multiple formatting characters) in PDF Grid using our PDF library. Please refer the below documentation link to know about working with tables,  
 
Please let us know if you need any further assistance in this. 
 
Regards, 
Gowthamraj K 


Marked as answer
Loader.
Up arrow icon