Class TextExtractor
Contenuti
[
Nascondere
]Classe TextExtractor
Rappresenta il plugin TextExtractor.
public class TextExtractor : PdfExtractor
Costruttori
Nome | Descrizione |
---|---|
TextExtractor() | Il costruttore predefinito. |
Metodi
Nome | Descrizione |
---|---|
Dispose() | Implementazione di IDisposable. In realtà, non è necessario per PdfExtractor. |
Process(IPluginOptions) | Avvia l’elaborazione di PdfExtractor con i parametri specificati. |
Osservazioni
L’oggetto TextExtractor
viene utilizzato per estrarre testo nei documenti PDF.
Esempi
L’esempio dimostra come estrarre il contenuto testuale di 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();
}
Vedi Anche
- classe PdfExtractor
- namespace Aspose.Pdf.Plugins
- assembly Aspose.PDF