Class TextExtractorOptions
De naam: Aspose.Pdf.Plugins Verzameling: Aspose.PDF.dll (25.4.0)
Vertegenwoordigt tekstextractie opties voor de TextExtractor plugin.
public sealed class TextExtractorOptions : PdfExtractorOptions, IPluginOptions
Inheritance
object ← PdfExtractorOptions ← TextExtractorOptions
Implements
Geëerbiede leden
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
Het voorbeeld laat zien hoe je tekstinhoud van een PDF-document kunt extraheren.
// 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
Het Aspose.Pdf.Plugins.TextExtractorOptions-object wordt gebruikt om Aspose.Pdf.Plugins.TextExtractorOptions.TextFormattingMode en andere opties voor de tekstextractie-operatie te instellen.Ook ervaart het functies om gegevens (bestanden, stromen) toe te voegen die input PDF-documenten vertegenwoordigen.
Constructors
TextExtractorOptions(TextFormattingMode)
Initialiseert een nieuwe instantie van het Aspose.Pdf.Plugins.TextExtractorOptions object voor de gespecificeerde tekstformaat modus.
public TextExtractorOptions(TextExtractorOptions.TextFormattingMode formattingMode)
Parameters
formattingMode
TextExtractorOptions
.
TextFormattingMode
Text formatting mode waarde.
TextExtractorOptions()
Initialiseert een nieuwe instantie van het Aspose.Pdf.Plugins.TextExtractorOptions object met ‘Raw’ (default) tekstformaat modus.
public TextExtractorOptions()
Properties
FormattingMode
Wordt opgesteld in mode.
public TextExtractorOptions.TextFormattingMode FormattingMode { get; }
Eigendomswaarde
TextExtractorOptions . TextFormattingMode
OperationName
Terug de naam van de operatie.
public override string OperationName { get; }