Class PdfExtractor

Class PdfExtractor

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

Ini mewakili fungsi dasar untuk mengekstrak teks, gambar, dan jenis konten lainnya yang mungkin terjadi pada halaman dokumen PDF.

public abstract class PdfExtractor : IPlugin, IDisposable

Inheritance

object PdfExtractor

Derived

ImageExtractor , TextExtractor

Implements

IPlugin , IDisposable

anggota yang diwarisi

object.GetType() , object.MemberwiseClone() , 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 instructions
    textExtractorOptions = new TextExtractorOptions();

    // add input file path to data sources
    textExtractorOptions.AddInput(new FileDataSource(inputPath));

    // perform extraction process
    ResultContainer resultContainer = extractor.Process(textExtractorOptions);

    // get the extracted text from the ResultContainer object
    string textExtracted = resultContainer.ResultCollection[0].ToString();
}

Remarks

Objek Aspose.Pdf.Plugins.TextExtractor digunakan untuk mengekstrak teks, atau Aspose.Pdf.Plugins.ImageExtractor untuk mengekstrak gambar.

Constructors

PdfExtractor()

protected PdfExtractor()

Methods

Dispose()

Implementasi IDisposable. sebenarnya, itu tidak diperlukan untuk PdfExtractor.

public void Dispose()

Process(Pilihan IPlugin)

Memulai pemrosesan PdfExtractor dengan parameter yang ditentukan.

public ResultContainer Process(IPluginOptions pdfExtractorOptions)

Parameters

pdfExtractorOptions IPluginOptions

Opsi objek yang berisi instruksi untuk PDFExtractor.

Returns

ResultContainer

Sebuah objek ResultContainer yang berisi hasil ekstraksi.

 Indonesia