I want to print some data in the form using the code:
e.Graphics.DrawString(string.Format("السيد {0}", lstCustomers.Text), regularFont, Brushes.Black, 30, y);
but there are some Arabic text beside English once. And here, If the layout is not set as RightToLeft, the text not appear correctly.
The problem is: In printing, I don't see the property needed!
Use StringFormat
and specify format flag to DirectionRightToLeft
, So:
using (StringFormat format = new StringFormat(StringFormatFlags.DirectionRightToLeft))
{
e.Graphics.DrawString(string.Format("السيد {0}"), font, brush, location, format);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With