Class TextExtractorOptions

Class TextExtractorOptions

Името на пространството: Aspose.Pdf.Plugins Асамблея: Aspose.PDF.dll (25.4.0)

Представя опции за извличане на текст за плагина TextExtractor.

public sealed class TextExtractorOptions : PdfExtractorOptions, IPluginOptions

Inheritance

object PdfExtractorOptions TextExtractorOptions

Implements

IPluginOptions

наследници

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

Примерът показва как да се извлече текстово съдържание от 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

Aspose.Pdf.Plugins.TextExtractorOptions се използва за настройка на Aspose.Pdf.Plugins.TextExtractorOptions.TextFormattingMode.Също така, тя наследява функции за добавяне на данни (файлове, потоци) представляващи входящи PDF документи.

Constructors

TextExtractorOptions(TextFormattingMode)

Aspose.Pdf.Plugins.TextExtractorOptions.

public TextExtractorOptions(TextExtractorOptions.TextFormattingMode formattingMode)

Parameters

formattingMode TextExtractorOptions . TextFormattingMode

Текст форматиране на стойността на режима.

TextExtractorOptions()

Aspose.Pdf.Plugins.TextExtractorOptions с режим на форматиране на текст “Raw.

public TextExtractorOptions()

Properties

FormattingMode

Мода за форматиране.

public TextExtractorOptions.TextFormattingMode FormattingMode { get; }

стойност на имота

TextExtractorOptions . TextFormattingMode

OperationName

Името на операцията се връща.

public override string OperationName { get; }

стойност на имота

string

 Български