Class TextExtractor

Class TextExtractor

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

Rappresenta il plugin TextExtractor.

public class TextExtractor : PdfExtractor, IPlugin, IDisposable

Ereditarietà

objectPdfExtractorTextExtractor

Implementa

IPlugin, IDisposable

Membri ereditati

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

Esempi

L’esempio dimostra come estrarre il contenuto testuale di un documento PDF.

// crea un oggetto TextExtractor per estrarre il testo nei contenuti PDF
using (TextExtractor extractor = new TextExtractor())
{
    // crea TextExtractorOptions
    textExtractorOptions = new TextExtractorOptions();

    // aggiungi il percorso del file di input alle fonti di dati
    textExtractorOptions.AddDataSource(new FileDataSource(inputPath));

    // esegui il processo di estrazione
    ResultContainer resultContainer = extractor.Process(textExtractorOptions);

    // ottieni il testo estratto dall'oggetto ResultContainer
    string textExtracted = resultContainer.ResultCollection[0].ToString();
}

Osservazioni

L’oggetto Aspose.Pdf.Plugins.TextExtractor viene utilizzato per estrarre testo nei documenti PDF.

Costruttori

TextExtractor()

public TextExtractor()
 Italiano