Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created June 10, 2024 11:47
Show Gist options
  • Save bjoerntx/715716e691f630fbe379ece27dabd0c6 to your computer and use it in GitHub Desktop.
Save bjoerntx/715716e691f630fbe379ece27dabd0c6 to your computer and use it in GitHub Desktop.
using (TXTextControl.ServerTextControl tx = new TXTextControl.ServerTextControl())
{
tx.Create();
TXTextControl.LoadSettings loadSettings = new TXTextControl.LoadSettings()
{
PDFImportSettings = TXTextControl.PDFImportSettings.GenerateLines
};
tx.Load("invoice.pdf", TXTextControl.StreamType.AdobePDF, loadSettings);
// Write document meta data to the console
Console.WriteLine($"Author: {loadSettings.Author}");
Console.WriteLine($"Subject: {loadSettings.DocumentSubject}");
Console.WriteLine($"Title: {loadSettings.DocumentTitle}");
Console.WriteLine($"Creation Date: {loadSettings.CreationDate}");
Console.WriteLine($"Application: {loadSettings.CreatorApplication}");
foreach (string keyword in loadSettings.DocumentKeywords)
{
Console.WriteLine($"Keyword: {keyword}");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment