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);
}
}