Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created August 15, 2023 19:06
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/124d3ce51e73a89bcaf2572fa89e774a to your computer and use it in GitHub Desktop.
Save bjoerntx/124d3ce51e73a89bcaf2572fa89e774a to your computer and use it in GitHub Desktop.
// create a new load settings object
TXTextControl.LoadSettings ls = new TXTextControl.LoadSettings() {
// set the PDF import settings
PDFImportSettings = PDFImportSettings.GenerateTextFrames
};
// load the PDF document
textControl1.Load("pdf_template.pdf", TXTextControl.StreamType.AdobePDF, ls);
// iterate through all text parts
foreach (IFormattedText formattedText in textControl1.TextParts) {
// iterate through all tables
foreach (Table table in formattedText.Tables) {
Debug.WriteLine(Table2Data(table, true));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment