Class TextExtractorOptions
Numele spaţiului: Aspose.Pdf.Plugins Adunare: Aspose.PDF.dll (25.5.0)
Prezintă opțiunile de extracție a textului pentru pluginul TextExtractor.
public sealed class TextExtractorOptions : PdfExtractorOptions, IPluginOptionsInheritance
object ← PdfExtractorOptions ← TextExtractorOptions
Implements
Membrii moștenitori
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
Exemplul arată cum să extrageți conținutul text din documentul 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
Obiectul Aspose.Pdf.Plugins.TextExtractorOptions este utilizat pentru a configura Aspose.Pdf.Plugins.TextExtractorOptions.TextFormattingMode și alte opțiuni pentru operațiunea de extracție a textului.De asemenea, are funcții pentru a adăuga date (file, fluxuri) care reprezintă documentele PDF de intrare.
Constructors
TextExtractorOptions(TextFormattingMode)
Inițializează un nou obiect Aspose.Pdf.Plugins.TextExtractorOptions pentru modul de formatare a textului specificat.
public TextExtractorOptions(TextExtractorOptions.TextFormattingMode formattingMode)Parameters
formattingMode TextExtractorOptions
.
TextFormattingMode
Valoarea modului de formatare text.
TextExtractorOptions()
Inițializează o nouă instanță a obiectului Aspose.Pdf.Plugins.TextExtractorOptions cu modul de formatare a textului ‘Raw’ (default).
public TextExtractorOptions()Properties
FormattingMode
Modul de formatare.
public TextExtractorOptions.TextFormattingMode FormattingMode { get; }Valoarea proprietății
TextExtractorOptions . TextFormattingMode
OperationName
Întoarceți numele operației.
public override string OperationName { get; }