Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created June 10, 2024 10:52
Show Gist options
  • Save bjoerntx/4394ace63afcaa172c587bd046c0240a to your computer and use it in GitHub Desktop.
Save bjoerntx/4394ace63afcaa172c587bd046c0240a to your computer and use it in GitHub Desktop.
using TXTextControl.DocumentServer.PDF.Contents;
Lines pdfLines = new Lines("invoice.pdf");
string stringToFind = "Total:";
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