我有这段代码,我正在使用它来获取PDF文本。这对使用英文的PDF格式非常有用,但是当我尝试用阿拉伯语提取文本时,它会显示出类似这样的内容。使用itextsharp在c#中提取阿拉伯语文本
“)+ N 9 N < +,+)+ $#$ + $ F%9 & < $:;”。
using (PdfReader reader = new PdfReader(path))
{
ITextExtractionStrategy strategy = new SimpleTextExtractionStrategy();
String text = "";
for (int i = 1; i <= reader.NumberOfPages; i++)
{
text = PdfTextExtractor.GetTextFromPage(reader, i,strategy);
}
这看起来像PDF不包含根据pdf规范提取文本所需的信息。 – mkl
你试过这个http://stackoverflow.com/questions/35436158/itextsharp-cant-extract-pdf-unicode-content-in-c-sharp? – KMoussa
没有有很多的话,但iTextSharp的代码用阿拉伯文写着 –