Class ImageExtractor

Class ImageExtractor

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

Đại diện cho plugin ImageExtractor.

public class ImageExtractor : PdfExtractor, IPlugin, IDisposable

Kế thừa

objectPdfExtractorImageExtractor

Triển khai

IPlugin, IDisposable

Các thành viên kế thừa

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

Ví dụ

Ví dụ này minh họa cách trích xuất hình ảnh từ tài liệu PDF.

// tạo đối tượng ImageExtractor để trích xuất hình ảnh
using (ImageExtractor extractor = new ImageExtractor())
{
    // tạo ImageExtractorOptions
    imageExtractorOptions = new ImageExtractorOptions();

    // thêm đường dẫn tệp đầu vào vào nguồn dữ liệu
    imageExtractor.AddDataSource(new FileDataSource(inputPath));

    // thực hiện quá trình trích xuất
    ResultContainer resultContainer = extractor.Process(imageExtractorOptions);

    // lấy hình ảnh từ đối tượng ResultContainer
    var imageExtracted = resultContainer.ResultCollection[0].ToFile();
}

Nhận xét

Đối tượng Aspose.Pdf.Plugins.ImageExtractor được sử dụng để trích xuất văn bản trong các tài liệu PDF.

Các hàm khởi tạo

ImageExtractor()

public ImageExtractor()
 Tiếng Việt