How to extract highlighed text from PDF using iTextSharp?
问题 As per folowing post: iTextSharp PDF Reading highlighed text (highlight annotations) using C# this code: for (int i = pageFrom; i <= pageTo; i++) { PdfDictionary page = reader.GetPageN(i); PdfArray annots = page.GetAsArray(iTextSharp.text.pdf.PdfName.ANNOTS); if (annots!=null) foreach (PdfObject annot in annots.ArrayList) { PdfDictionary annotation = (PdfDictionary)PdfReader.GetPdfObject(annot); PdfString contents = annotation.GetAsString(PdfName.CONTENTS); // now use the String value of