Class PdfExtractor

Class PdfExtractor

Namespace: Aspose.Pdf.Plugins
Assembly: Aspose.PDF.dll

מייצג פונקציונליות בסיסית לחילוץ טקסט, תמונות וסוגים אחרים של תוכן שעשויים להופיע בדפי מסמכי PDF.

public abstract class PdfExtractor : IPlugin, IDisposable

ירושה

objectPdfExtractor

נגזר

ImageExtractor, TextExtractor

מיישם

IPlugin, IDisposable

חברים ירושים

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

דוגמאות

הדוגמה מדגימה כיצד לחלץ תוכן טקסטואלי ממסמך PDF.

// צור אובייקט TextExtractor לחילוץ תוכן PDF
using (TextExtractor extractor = new TextExtractor())
{
    // צור אובייקט TextExtractorOptions כדי לקבוע הוראות
    textExtractorOptions = new TextExtractorOptions();

    // הוסף את נתיב הקובץ הקלט למקורות הנתונים
    textExtractorOptions.AddInput(new FileDataSource(inputPath));

    // בצע את תהליך החילוץ
    ResultContainer resultContainer = extractor.Process(textExtractorOptions);

    // קבל את הטקסט שחולץ מאובייקט ResultContainer
    string textExtracted = resultContainer.ResultCollection[0].ToString();
}

הערות

אובייקט Aspose.Pdf.Plugins.TextExtractor משמש לחילוץ טקסט, או Aspose.Pdf.Plugins.ImageExtractor לחילוץ תמונות.

בונים

PdfExtractor()

protected PdfExtractor()

שיטות

Dispose()

יישום של IDisposable. למעשה, זה לא הכרחי עבור PdfExtractor.

public void Dispose()

Process(IPluginOptions)

מחל על תהליך PdfExtractor עם הפרמטרים המצוינים.

public ResultContainer Process(IPluginOptions pdfExtractorOptions)

פרמטרים

pdfExtractorOptions IPluginOptions

אובייקט אפשרויות המכיל הוראות עבור PdfExtractor.

מחזיר

ResultContainer

אובייקט ResultContainer המכיל את התוצאה של החילוץ.

 Ελληνικά