I am trying to make a program which extracts the text from a PDF document PDF documents contain ARABIC text written by different types of FONT
when I extract the text it works with some files and others not it gives me ambiguous Text
I am using c # and Itext7 to make this program
please show me the methodology to do this with some examples
thank you



My code :
C#
StringBuilder processed = new StringBuilder();
var src = "d:\\text06.pdf";
var pdfDocument = new PdfDocument(new PdfReader(src));
var strategy = new LocationTextExtractionStrategy();
for (int i = 1; i Converted_Lines = new List();
foreach (string s in lines)
{
string converted_string = Inverse(s);
Converted_Lines.Add(converted_string);
}
textBox1.Text = String.Join(Environment.NewLine, Converted_Lines);
Uehara AyakaRank #2,730 · 512 reputationPosted Aug 30, 2021, 8:53 PM EDT
Marvin ReidRank #1,963 · 746 reputationPosted Aug 31, 2021, 9:36 AM EDT