– Not able to read the text from PDF file only in Citrix server using C#
In Reply To
I am not able to read the text from PDF file only in Citrix server. But its working fine in local desktop.
I wrote the below code for taking the text from PDF file.
using (PdfReader reader = new PdfReader(Directory_Path + "\\" + selectedFileName))
int Total_Pages = reader.NumberOfPages;
for (int i = 1; i <= reader.NumberOfPages; i++)
StringBuilder text = new StringBuilder();
ITextExtractionStrategy Strategy = new iTextSharp.text.pdf.parser.LocationTextExtractionStrategy();
string page = "";
page = PdfTextExtractor.GetTextFromPage(reader, i, Strategy);
string lines = page.Split('\n');
foreach (string line in lines)
Getting the Index out of Range issue.
Kindly help me out on this.