PDF文件扫描
PdfReader pdfReader = new PdfReader(pdfFilePath);
int numberOfPages = pdfReader.NumberOfPages;
StringBuilder text = new StringBuilder();
for (int i = 1; i <= numberOfPages; ++i)
{
text.Append(iTextSharp.text.pdf.parser.PdfTextExtractor.GetTextFromPage(pdfReader, i));
}
pdfReader.Close();
string pdfContent = text.ToString();
1