Class TextExtractor

Class TextExtractor

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

Reprezentuje wtyczkę TextExtractor.

public class TextExtractor : PdfExtractor, IPlugin, IDisposable

Dziedziczenie

objectPdfExtractorTextExtractor

Implementuje

IPlugin, IDisposable

Członkowie dziedziczeni

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

Przykłady

Przykład ilustruje, jak wyodrębnić zawartość tekstową dokumentu PDF.

// utwórz obiekt TextExtractor, aby wyodrębnić tekst w zawartości PDF
using (TextExtractor extractor = new TextExtractor())
{
    // utwórz TextExtractorOptions
    textExtractorOptions = new TextExtractorOptions();

    // dodaj ścieżkę pliku wejściowego do źródeł danych
    textExtractorOptions.AddDataSource(new FileDataSource(inputPath));

    // przeprowadź proces ekstrakcji
    ResultContainer resultContainer = extractor.Process(textExtractorOptions);

    // pobierz wyodrębniony tekst z obiektu ResultContainer
    string textExtracted = resultContainer.ResultCollection[0].ToString();
}

Uwagi

Obiekt Aspose.Pdf.Plugins.TextExtractor jest używany do wyodrębniania tekstu w dokumentach PDF.

Konstruktory

TextExtractor()

public TextExtractor()
 Polski