Class ImageExtractor
Class ImageExtractor
Namespace: Aspose.Pdf.Plugins
Assembly: Aspose.PDF.dll
Reprezentuje plugin ImageExtractor.
public class ImageExtractor : PdfExtractor, IPlugin, IDisposable
Dědění
object ← PdfExtractor ← ImageExtractor
Implementuje
Děděné členy
PdfExtractor.Process(IPluginOptions), PdfExtractor.Dispose(), object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Příklady
Příklad ukazuje, jak extrahovat obrázky z PDF dokumentu.
// vytvořit objekt ImageExtractor pro extrakci obrázků
using (ImageExtractor extractor = new ImageExtractor())
{
// vytvořit ImageExtractorOptions
imageExtractorOptions = new ImageExtractorOptions();
// přidat cestu k vstupnímu souboru do datových zdrojů
imageExtractor.AddDataSource(new FileDataSource(inputPath));
// provést proces extrakce
ResultContainer resultContainer = extractor.Process(imageExtractorOptions);
// získat obrázek z objektu ResultContainer
var imageExtracted = resultContainer.ResultCollection[0].ToFile();
}
Poznámky
Objekt Aspose.Pdf.Plugins.ImageExtractor se používá k extrakci textu v PDF dokumentech.
Konstruktory
ImageExtractor()
public ImageExtractor()