Class ImageExtractor
Contents
[
Hide
]ImageExtractor class
Represents ImageExtractor plugin.
public class ImageExtractor : PdfExtractor
Constructors
Name | Description |
---|---|
ImageExtractor() | The default constructor. |
Methods
Name | Description |
---|---|
Dispose() | Implementation of IDisposable. Actually, it is not necessary for PdfExtractor. |
Process(IPluginOptions) | Starts PdfExtractor processing with the specified parameters. |
Remarks
The ImageExtractor
object is used to extract text in PDF documents.
Examples
The example demonstrates how to extract images from PDF document.
// create ImageExtractor object to extract images
using (ImageExtractor extractor = new ImageExtractor())
{
// create ImageExtractorOptions
imageExtractorOptions = new ImageExtractorOptions();
// add input file path to data sources
imageExtractor.AddDataSource(new FileDataSource(inputPath));
// perform extraction process
ResultContainer resultContainer = extractor.Process(imageExtractorOptions);
// get the image from the ResultContainer object
var imageExtracted = resultContainer.ResultCollection[0].ToFile();
}
See Also
- class PdfExtractor
- namespace Aspose.Pdf.Plugins
- assembly Aspose.PDF