recently our project upgraded to a new iTextSharp.LGPLv2.Core v1.6.5. I had a method which extracted a text from the PDF file.
Back then I used this:
if (File.Exists(pdf1Path))
{
var pdfReader = new PdfReader(pdf1Path);
string pdfText;
string currentText;
//Text extracting to List
for (int i = 1; i <= pdfReader.NumberOfPages; i++)
{
currentText = PdfTextExtractor.GetTextFromPage(pdfReader, i);
currentText =
Encoding.UTF8.GetString(ASCIIEncoding.Convert(Encoding.Default, Encoding.UTF8,
Encoding.Default.GetBytes(currentText)));
text.Append(currentText);
}
pdfText = text.ToString();
}
Now suddenly I cannot recognize "PdfTextExtractor". Is there any other option on how to get this working? Note that I am not allowed to install any other libraries or packages.
I tried to use
using iTextSharp.text.pdf.parser;
but it is not recognized anymore. And when I try to download it, it just overlaps with iTextSharp.LGPLv2.Core which gives me an error.
Thanks for the help