有没有支持阿拉伯字体的pdf库?
Is there any pdf library that supports arabic font?
我正在为我的学士学位做期末项目。好吧,词干分析器 (Urdu Stemmer) 乌尔都语是 Pakistan.We 的国家语言,用阿拉伯语写乌尔都语 font.I 我正在尝试将输出保存在 PDF 文件中。我正在使用 itextsharp 库,但它不打印任何内容,因为它不支持阿拉伯语字体。那么你们中的任何人都可以向我推荐任何其他支持阿拉伯字体的库吗?
private void button1_Click(object sender, EventArgs e)
{
string t = Stemtxtbox.Text;
Document document = new Document();
PdfWriter.GetInstance(document, new FileStream("E:/a.pdf", FileMode.Create));
document.Open();
Paragraph p = new Paragraph(t);
document.Add(p);
document.Close();
}
您需要调用PdfPTable.RunDirection = PdfWriter.RUN_DIRECTION_RTL
表明您要使用双向算法。 ColumnText
.
中也有类似的属性
我正在为我的学士学位做期末项目。好吧,词干分析器 (Urdu Stemmer) 乌尔都语是 Pakistan.We 的国家语言,用阿拉伯语写乌尔都语 font.I 我正在尝试将输出保存在 PDF 文件中。我正在使用 itextsharp 库,但它不打印任何内容,因为它不支持阿拉伯语字体。那么你们中的任何人都可以向我推荐任何其他支持阿拉伯字体的库吗?
private void button1_Click(object sender, EventArgs e)
{
string t = Stemtxtbox.Text;
Document document = new Document();
PdfWriter.GetInstance(document, new FileStream("E:/a.pdf", FileMode.Create));
document.Open();
Paragraph p = new Paragraph(t);
document.Add(p);
document.Close();
}
您需要调用PdfPTable.RunDirection = PdfWriter.RUN_DIRECTION_RTL
表明您要使用双向算法。 ColumnText
.