Class TextExtractor
معلومات
تمثل المكون الإضافي Documentize.TextExtractor. يُستخدم لاستخراج النص من مستندات PDF.
public static class TextExtractor
Inheritance
Inherited Members
- object.GetType(),
- object.MemberwiseClone(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
Examples
المثال يوضح كيفية استخراج محتوى النص من مستند PDF.
// Create TextExtractorOptions object to set instructions
var options = new TextExtractorOptions();
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Perform the process
var results = TextExtractor.Process(options);
// Get the extracted text from the ResultContainer object
var textExtracted = results.ResultCollection[0].ToString();
المثال يوضح كيفية استخراج محتوى النص من مستند PDF مع TextFormattingMode.
// Create TextExtractorOptions object to set TextFormattingMode
var options = new TextExtractorOptions(TextFormattingMode.Pure);
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Perform the process
var results = TextExtractor.Process(options);
// Get the extracted text from the ResultContainer object
var textExtracted = results.ResultCollection[0].ToString();
Methods
Process(TextExtractorOptions)
استخراج النص من مستند PDF.
public static ResultContainer Process(TextExtractorOptions options)
Parameters
options
TextExtractorOptions: كائن خيارات يحتوي على تعليمات للعملية.
Returns
ResultContainer : كائن يحتوي على نتيجة الاستخراج.
Exceptions
إذا لم يتم تعيين الخيارات.
Namespace: Documentize Assembly: Documentize.dll