Class TextExtractor

Class TextExtractor

Tên không gian: Aspose.Pdf.Plugins Tổng hợp: Aspose.PDF.dll (25.4.0)

Hiển thị TextExtractor plugin.

public class TextExtractor : PdfExtractor, IPlugin, IDisposable

Inheritance

object PdfExtractor TextExtractor

Implements

IPlugin , IDisposable

Thành viên thừa kế

PdfExtractor.Process(IPluginOptions) , PdfExtractor.Dispose() , object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Examples

Ví dụ này cho thấy cách lấy nội dung văn bản từ tài liệu PDF.

// create TextExtractor object to extract text in PDF contents
using (TextExtractor extractor = new TextExtractor())
{
    // create TextExtractorOptions
    textExtractorOptions = new TextExtractorOptions();

    // add input file path to data sources
    textExtractorOptions.AddDataSource(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

Các Aspose.Pdf.Plugins.TextExtractor đối tượng được sử dụng để thu thập văn bản trong tài liệu PDF.

Constructors

TextExtractor()

public TextExtractor()
 Tiếng Việt