Class TextExtractor

Clase TextExtractor

Representa el plugin TextExtractor.

public class TextExtractor : PdfExtractor

Constructores

NombreDescripción
TextExtractor()El constructor por defecto.

Métodos

NombreDescripción
Dispose()Implementación de IDisposable. En realidad, no es necesario para PdfExtractor.
Process(IPluginOptions)Inicia el procesamiento de PdfExtractor con los parámetros especificados.

Observaciones

El objeto TextExtractor se utiliza para extraer texto en documentos PDF.

Ejemplos

El ejemplo demuestra cómo extraer el contenido de texto de un documento PDF.

// create TextExtractor object to extract text in PDF contents
using (TextExtractor extractor = new TextExtractor())
{
    // create TextExtractorOptions
    textExtractorOptions = new TextExtractorOptions();
    
    // add input file path to data sources
    textExtractorOptions.AddDataSource(new FileDataSource(inputPath));
    
    // perform extraction process
    ResultContainer resultContainer = extractor.Process(textExtractorOptions);
    
    // get the extracted text from the ResultContainer object
    string textExtracted = resultContainer.ResultCollection[0].ToString();
}

Ver También