Class TextExtractor

Class TextExtractor

Namespace: Aspose.Pdf.Plugins
Assembly: Aspose.PDF.dll

Представляє плагін TextExtractor.

public class TextExtractor : PdfExtractor, IPlugin, IDisposable

Спадкування

objectPdfExtractorTextExtractor

Реалізує

IPlugin, IDisposable

Спадковані члени

PdfExtractor.Process(IPluginOptions), PdfExtractor.Dispose(), object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Приклади

Приклад демонструє, як витягти текстовий вміст PDF-документа.

// створити об'єкт TextExtractor для витягування тексту з вмісту PDF
using (TextExtractor extractor = new TextExtractor())
{
    // створити TextExtractorOptions
    textExtractorOptions = new TextExtractorOptions();

    // додати шлях до вхідного файлу до джерел даних
    textExtractorOptions.AddDataSource(new FileDataSource(inputPath));

    // виконати процес витягування
    ResultContainer resultContainer = extractor.Process(textExtractorOptions);

    // отримати витягнутий текст з об'єкта ResultContainer
    string textExtracted = resultContainer.ResultCollection[0].ToString();
}

Зауваження

Об’єкт Aspose.Pdf.Plugins.TextExtractor використовується для витягування тексту з PDF-документів.

Конструктори

TextExtractor()

public TextExtractor()
 Українська