Class TextExtractorOptions

Class TextExtractorOptions

Nama dari : Aspose.Pdf.Plugins Pengumpulan: Aspose.PDF.dll (25.5.0)

Menampilkan opsi ekstraksi teks untuk plugin TextExtractor.

public sealed class TextExtractorOptions : PdfExtractorOptions, IPluginOptions

Inheritance

object PdfExtractorOptions TextExtractorOptions

Implements

IPluginOptions

anggota yang diwarisi

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

Contohnya menunjukkan cara mengekstrak konten teks dari dokumen 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

Objek Aspose.Pdf.Plugins.TextExtractorOptions digunakan untuk mengatur Aspose.Pdf.Plugins.TextExtractorOptions.TextFormattingMode dan opsi lain untuk operasi ekstraksi teks.Juga, itu mewarisi fungsi untuk menambahkan data (fail, aliran) yang mewakili input PDF dokumen.

Constructors

TextExtractorOptions(TextFormattingMode)

Inicialisasi contoh baru dari Aspose.Pdf.Plugins.TextExtractorOptions objek untuk mode format teks yang ditentukan.

public TextExtractorOptions(TextExtractorOptions.TextFormattingMode formattingMode)

Parameters

formattingMode TextExtractorOptions . TextFormattingMode

Mengatur nilai mode teks.

TextExtractorOptions()

Inicialisasi contoh baru dari Aspose.Pdf.Plugins.TextExtractorOptions objek dengan ‘Raw’ (default) mode format teks.

public TextExtractorOptions()

Properties

FormattingMode

Dapatkan format mode.

public TextExtractorOptions.TextFormattingMode FormattingMode { get; }

Nilai Properti

TextExtractorOptions . TextFormattingMode

OperationName

Mengembalikan nama operasi.

public override string OperationName { get; }

Nilai Properti

string

 Indonesia