Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created June 16, 2022 11:11
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/656ec0f9999c1764db923d62942acdb2 to your computer and use it in GitHub Desktop.
Save bjoerntx/656ec0f9999c1764db923d62942acdb2 to your computer and use it in GitHub Desktop.
Lines pdfLines = new Lines("lease_agreement.pdf");
string stringToFind = "Agreement";
List<ContentLine> contentLines =
pdfLines.Find(stringToFind);
foreach (ContentLine line in contentLines) {
Console.WriteLine("Found string \"{0}\" on page {1} (X: {2}, Y: {3}): {4}",
stringToFind,
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