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

Пример показује како извући текстуални садржај из ПДФ документа.

// 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

Objekat Aspose.Pdf.Plugins.TextExtractorOptions se koristi za postavljanje Aspose.Pdf.Plugins.TextExtractorOptions.TextFormattingMode i druge opcije za rad ekstrakcije teksta.Такође, наслеђује функције за додавање података (файлове, струје) који представљају улазни ПДФ документи.

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

 Српски