I am reading an arabic localized pdf document in memory using c# and after reading the text i am getting it like this
٩٠/٤٠/٧٣٤١ ٩١/١٠/٦١٠٢
but the correct direction of this text in pdf is ٢٠١٦/٠١/١٩ ١٤٣٧/٠٤/٠٩
Can somebody please guide how can change this text direction to proper direction as it is appearing in pdf.
Edit
This is the function i am using. I am using Devexpress Document server, I am skipping upto line 36 as I do not need the data before line 36.
private void button1_Click(object sender, EventArgs e)
{
using (var documentStream = new FileStream(@"D:\Data\Projects\DotNet\ElectricBillReader\electricbill.pdf", FileMode.Open, FileAccess.Read))
{
using (PdfDocumentProcessor documentProcessor = new PdfDocumentProcessor())
{
documentProcessor.LoadDocument(documentStream);
using (var sr = new StringReader(documentProcessor.Text))
{
var counter = 0;
string line = string.Empty;
do
{
line = sr.ReadLine();
if (counter > 36)
{
if (line != null)
{
}
}
counter++;
} while (line!=null);
}
}
}
}