Hello,
I'm trying to add some information with Arabic (Unicode) in PDF, but unfortunately it didn't work even with using utf-8 in XML file .I used a specific template for Arabic numbers and it works fine while the font that suppose to work with Arabic words is not working fine, so please have a look to the code below and help me.
XML code is
<?xml version="1.0" encoding="utf-8" ?>
the most important things here are :
Table ColumnWidths="120 120 60 40 200" DefaultCellPaddingBottom="0" DefaultCellPaddingLeft="35" DefaultCellPaddingRight="0" DefaultCellPaddingTop="0">
- <Border>
<All LineWidth="0" />
</Border>
- <DefaultCellBorder>
<All LineWidth="0" />
</DefaultCellBorder>
- <Row>
<Cell />
<Cell />
<Cell />
<Cell />
- <Cell PaddingLeft="0">
- <Text ID="TextCustomerName" FontName="Times New Roman" FontSize="10" Alignment="Right">
<Segment ID="SegmentCustomerName" Alignment="Right" FontName="Times New Roman" FontSize="10" IsUnicode="true" IsRightToLeft="True">CustomerName</Segment>
<Segment ID="SegmentCustomerAddress">C/O Banque Saudi Fransi</Segment>
</Text>
</Cell>
</Row>
</Table>
The above is XML schema and I wrote the value of string from the code as below :
C# code
Segment customerName = pdf.GetObjectByID("SegmentCustomerName") as Segment;
customerName.Content = customerName.Content.Replace(customerName.Content.ToString(), ("عملية تسديد بطاقة فيزا "));
The problem here is the result supposes to be Arabic sentence, while it is appearing as separate characters.
I'II appreciate any help in this regard...
Thanks ,
Abdullah Al.Fifi
KSA- BSF Developer