C# 我想用阿拉伯语字体写

C# 我想用阿拉伯语字体写,c#,asp.net,fonts,pdf-generation,itextsharp,C#,Asp.net,Fonts,Pdf Generation,Itextsharp,我正在Asp.net应用程序中使用Itextsharp 要创建阿拉伯语文本,请使用DataTables,但此代码不起作用 BaseFont baseFont = BaseFont.CreateFont("c:\\\\windows\\\\fonts\\\\tahoma.ttf", BaseFont.IDENTITY_H, true); iTextSharp.text.Font FontAr = new iTextSharp.text.Font(baseFont, 10, iTextSharp.t

我正在Asp.net应用程序中使用Itextsharp

要创建阿拉伯语文本,请使用DataTables,但此代码不起作用

BaseFont baseFont = BaseFont.CreateFont("c:\\\\windows\\\\fonts\\\\tahoma.ttf", BaseFont.IDENTITY_H, true);
iTextSharp.text.Font FontAr = new iTextSharp.text.Font(baseFont, 10, iTextSharp.text.Font.NORMAL);
PdfPTable table = new PdfPTable(4);
PdfPCell cell = new PdfPCell(new Paragraph(3f,"مرحبا" ,FontAr));

它在文本中显示反转字符,在表格单元格中根本不显示,

看到这一点,真的很有帮助。。感谢alotI以前遇到过这个问题,您可以看看我的问题“使用itextsharp将阿拉伯语“unicode”内容html或xml转换为pdf”,这可能会对您有所帮助