Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created June 16, 2022 11:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/0088605c1e88e7dd8776797618b64d49 to your computer and use it in GitHub Desktop.
Save bjoerntx/0088605c1e88e7dd8776797618b64d49 to your computer and use it in GitHub Desktop.
Lines pdfLines = new Lines("lease_agreement.pdf");
string stringToFind = "Agreement";
List<ContentLine> contentLines =
pdfLines.Find(new RectangleF(72,83, 10, 10), true);
foreach (ContentLine line in contentLines) {
Console.WriteLine("Found text on page {0} (X: {1}, Y: {2}): {3}",
line.Page.ToString(),
line.X.ToString(),
line.Y.ToString(),
line.Text);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment