Align text in RTL format for languages such as Arabic, Hebrew, etc.

Will this option be added to Xamarin Forms?
Currently, when creating PDF the Hebrew language does not show at all, just blank space.
Tried as regular text and in a table creation.

3 Replies

SL Sowmiya Loganathan Syncfusion Team January 25, 2018 10:18 AM UTC

Hi Ilya, 

Currently we do not have support to “Draw RTL text in the PDF document in Xamarin Forms”. We have added to this in our feature request list and will be implemented in any of our release.   
 
Please find the our support list in the below link:  

Please let us know if you have any further assistance on this. 

Regards, 
Sowmiya L 



SK Sasi Kumar Sekar Syncfusion Team June 26, 2018 07:23 AM UTC

Hi Ilya, 
  
We are glad to announce that our Essential Studio 2018 Volume 2 Release v16.2.0.41 is rolled out and is available for download under the following link. 
 
 
We have implemented the feature with “Need to add support for Draw RTL text in Xamarin Platform” in this release. Please refer the below code snippet for further details. 
 
           //Create a new PDF document.  
            PdfDocument document = new PdfDocument(); 
            //Add a new PDF page. 
            PdfPage page = document.Pages.Add();  
            //Create new PdfTrueTypeFont instance. 
            //Load the font from assets. 
            Stream fontStream = typeof(App).GetTypeInfo(). 
            Assembly.GetManifestResourceStream 
            ("RTLDemo.Assets.arial.ttf"); PdfTrueTypeFont font = new PdfTrueTypeFont(fontStream, 12); 
            //Create a PdfStringFormat. 
            PdfStringFormat format = new PdfStringFormat(); 
            //Set text direction.  
            format.TextDirection = PdfTextDirection.RightToLeft; 
            //Set text alignment.  
            format.Alignment = PdfTextAlignment.Right; 
            //Draw text to the PDF document. 
            page.Graphics.DrawString("بالعالم مرحبا !",font, PdfBrushes.Black, Syncfusion.Drawing.PointF.Empty, format); 
            //Save document. 
            MemoryStream ms = new MemoryStream(); 
            document.Save(ms); 
            //Close the PdfDocument instance. 
            document.Close(true); 
 
 
 
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance. 
 
Regards,            
Sasi Kumar S. 



IL Ilya June 26, 2018 08:17 AM UTC

Thank you so much !

Loader.
Up arrow icon