C# Extract text from PDF using PdfSharp
Took Sergio’s answer and made some extension methods. I also changed the accumulation of strings into an iterator. public static class PdfSharpExtensions { public static IEnumerable<string> ExtractText(this PdfPage page) { var content = ContentReader.ReadContent(page); var text = content.ExtractText(); return text; } public static IEnumerable<string> ExtractText(this CObject cObject) { if (cObject is COperator) { var cOperator … Read more