Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created November 16, 2023 15:34
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/5595a3717944ef60437ab359435a5933 to your computer and use it in GitHub Desktop.
Save bjoerntx/5595a3717944ef60437ab359435a5933 to your computer and use it in GitHub Desktop.
using (TXTextControl.ServerTextControl tx = new TXTextControl.ServerTextControl())
{
tx.Create();
TXTextControl.LoadSettings ls = new TXTextControl.LoadSettings()
{
PDFImportSettings = TXTextControl.PDFImportSettings.GenerateParagraphs
};
// load PDF document
tx.Load("App_Data/sample.pdf", TXTextControl.StreamType.AdobePDF, ls);
// retrieve plain text
var text = tx.Text;
Console.WriteLine(text);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment