Class TextExtractorOptions
Nom dels espais: Aspose.Pdf.Plugins Assemblea: Aspose.PDF.dll (25.4.0)
Representa les opcions d’extracció de text per al plugin TextExtractor.
public sealed class TextExtractorOptions : PdfExtractorOptions, IPluginOptions
Inheritance
object ← PdfExtractorOptions ← TextExtractorOptions
Implements
Membres heretats
PdfExtractorOptions.AddInput(IDataSource) , PdfExtractorOptions.Inputs , PdfExtractorOptions.OperationName , object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Examples
L’exemple demostra com extreure contingut de text del document PDF.
// create TextExtractor object to extract PDF contents
using (TextExtractor extractor = new TextExtractor())
{
// create TextExtractorOptions object to set TextFormattingMode (Pure, or Raw - default)
extractorOptions = new TextExtractorOptions(TextExtractorOptions.TextFormattingMode.Pure);
// add input file path to data sources
extractorOptions.AddInput(new FileDataSource(inputPath));
// perform extraction process
ResultContainer resultContainer = extractor.Process(extractorOptions);
// get the extracted text from the ResultContainer object
string textExtracted = resultContainer.ResultCollection[0].ToString();
}
Remarks
L’objecte Aspose.Pdf.Plugins.TextExtractorOptions s’utilitza per configurar Aspose.Pdf.Plugins.TextExtractorOptions.TextFormattingMode i altres opcions per a l’operació d’extracció de text.A més, hereta funcions per afegir dades (arxius, fluxos) que representen documents PDF d’entrada.
Constructors
TextExtractorOptions(TextFormattingMode)
Inicialitza una nova instància de l’objecte Aspose.Pdf.Plugins.TextExtractorOptions per al mode de formatació de text especificat.
public TextExtractorOptions(TextExtractorOptions.TextFormattingMode formattingMode)
Parameters
formattingMode
TextExtractorOptions
.
TextFormattingMode
El text formatant el valor de la modalitat.
TextExtractorOptions()
Inicia una nova instància de l’objecte Aspose.Pdf.Plugins.TextExtractorOptions amb el mode de formatació de text ‘Raw’ (default.
public TextExtractorOptions()
Properties
FormattingMode
Formatar el mode.
public TextExtractorOptions.TextFormattingMode FormattingMode { get; }
Valor de la propietat
TextExtractorOptions . TextFormattingMode
OperationName
Retorna el nom de l’operaci.
public override string OperationName { get; }