ImagePlacementAbsorber Class
Represents an absorber object of image placement objects. Performs search of image usages and provides access to search results via ImagePlacements collection.
Inheritance Hierarchy

Namespace: Aspose.Pdf
Assembly: Aspose.PDF (in Aspose.PDF.dll) Version: 21.9.0
public sealed class ImagePlacementAbsorber

The ImagePlacementAbsorber type exposes the following members.

Public methodImagePlacementAbsorber
Initializes new instance of the ImagePlacementAbsorber object.
Public propertyImagePlacements
Gets collection of image placement occurrences that are presented with ImagePlacement objects.
Public propertyIsReadOnlyMode
Gets/sets read only mode for parsing operations collection. It may help against out of memory exceptions.
Public methodEquals (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodToString (Inherited from Object.)
Public methodVisit(Document)
Performs search on the specified document.
Public methodVisit(Page)
Performs search on the specified page.
The ImagePlacementAbsorber object is basically used in images search scenario. When the search is completed the occurrences are represented with ImagePlacement objects that the ImagePlacements collection contains. The ImagePlacement object provides access to the image placement properties: dimensions, resolution etc.
The example demonstrates how to find images on the first PDF document page and get the image placement properties.
// Open document
Document doc = new Document(@"D:\Tests\input.pdf");

// Create ImagePlacementAbsorber object to perform image placement search
ImagePlacementAbsorber abs = new ImagePlacementAbsorber();

// Accept the absorber for first page

// Display image placement properties for all placements
foreach (ImagePlacement imagePlacement in abs.ImagePlacements)
    Console.Out.WriteLine("image width:" + imagePlacement.Rectangle.Width);
    Console.Out.WriteLine("image height:" + imagePlacement.Rectangle.Height);
    Console.Out.WriteLine("image LLX:" + imagePlacement.Rectangle.LLX);
    Console.Out.WriteLine("image LLY:" + imagePlacement.Rectangle.LLY);
    Console.Out.WriteLine("image horizontal resolution:" + imagePlacement.Resolution.X);
    Console.Out.WriteLine("image vertical resolution:" + imagePlacement.Resolution.Y);
See Also