Class TextExtractor
Class TextExtractor
Namespace: Aspose.Pdf.Plugins
Assembly: Aspose.PDF.dll
نماینده پلاگین TextExtractor است.
public class TextExtractor : PdfExtractor, IPlugin, IDisposable
وراثت
object ← PdfExtractor ← TextExtractor
پیادهسازیها
اعضای وراثتیافته
PdfExtractor.Process(IPluginOptions), PdfExtractor.Dispose(), 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.AddDataSource(new FileDataSource(inputPath));
// انجام فرآیند استخراج
ResultContainer resultContainer = extractor.Process(textExtractorOptions);
// دریافت متن استخراجشده از شی ResultContainer
string textExtracted = resultContainer.ResultCollection[0].ToString();
}
ملاحظات
شی Aspose.Pdf.Plugins.TextExtractor برای استخراج متن در اسناد PDF استفاده میشود.
سازندهها
TextExtractor()
public TextExtractor()