Class TextExtractor

Class TextExtractor

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

Représente le plugin TextExtractor.

public class TextExtractor : PdfExtractor, IPlugin, IDisposable

Héritage

objectPdfExtractorTextExtractor

Implémente

IPlugin, IDisposable

Membres hérités

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

Exemples

L’exemple démontre comment extraire le contenu textuel d’un document PDF.

// créer un objet TextExtractor pour extraire le texte dans le contenu PDF
using (TextExtractor extractor = new TextExtractor())
{
    // créer TextExtractorOptions
    textExtractorOptions = new TextExtractorOptions();

    // ajouter le chemin du fichier d'entrée aux sources de données
    textExtractorOptions.AddDataSource(new FileDataSource(inputPath));

    // effectuer le processus d'extraction
    ResultContainer resultContainer = extractor.Process(textExtractorOptions);

    // obtenir le texte extrait de l'objet ResultContainer
    string textExtracted = resultContainer.ResultCollection[0].ToString();
}

Remarques

L’objet Aspose.Pdf.Plugins.TextExtractor est utilisé pour extraire du texte dans des documents PDF.

Constructeurs

TextExtractor()

public TextExtractor()
 Français