PdfImage Class

The PDF image class representing an image that can be added to a PDF document

Definition

Namespace: HiQPdf
Assembly: HiQPdf.NetCore (in HiQPdf.NetCore.dll) Version: 16.0.0
C#
public class PdfImage : PdfDrawableObject
Inheritance
Object    PdfObject    PdfDrawableObject    PdfImage

Constructors

PdfImage Constructs an empty PDF image. The SetPdfImage(Single, Single, Single, String) method must be called after the object creation
PdfImage(RectangleF, Image) Constructs a PDF image from the given .NET image to be laid out in the given destination rectangle in a PDF canvas. The aspect ratio of the image is preserved in PDF
PdfImage(RectangleF, String) Constructs a PDF image from the given image file to be laid out in the given destination rectangle in a PDF canvas. The aspect ratio of the image is preserved in PDF
PdfImage(RectangleF, Boolean, Image) Constructs a PDF image from the given .NET image to be laid out in the given destination rectangle in a PDF canvas
PdfImage(RectangleF, Boolean, String) Constructs a PDF image from the given image file to be laid out in the given destination rectangle in a PDF canvas
PdfImage(Single, Single, Image) Constructs an image from the given .NET image to be laid out at the given coordinate in a PDF canvas. The destination width in PDF is the available width in canvas
PdfImage(Single, Single, String) Constructs a PDF image from the given image file to be laid out at the given coordinate in a PDF canvas The destination width in PDF is the available width in canvas
PdfImage(Single, Single, Single, Image) Constructs an image from the given .NET image to be laid out at the given coordinate and in the given width in a PDF canvas
PdfImage(Single, Single, Single, String) Constructs a PDF image from the given image file to be laid out at the given coordinate and in the given width in a PDF canvas

Properties

AlphaBlending Controls if the alpha blending is enabled when drawing this image in PDF. This property is true by default
BackColor The PDF object back color
(Inherited from PdfDrawableObject)
BlendingMode The blending mode when this object is drawn in PDF. This property is Normal by default
(Inherited from PdfDrawableObject)
CanGrow Controls if the image can grow to fit the destination in PDF. This property is true by default
ClipRectangle The clip rectangle applied when drawing the object in PDF
(Inherited from PdfDrawableObject)
Cropping Controls is the image is cropped at the end of PDF page where it is rendered. This property is false by default and the image can continue on the next page if necessary
DestHeight The destination rectangle height in points
DestWidth The destination rectangle width in points
DestX The destination rectangle top left corner X coordinate in points
DestY The destination rectangle top left corner Y coordinate in points
ForceNewPdfPages Controls if a new PDF page is always created when the image object is laid out on the next PDF page. By default this property is false and if there is a next page already created in PDF document it will be used to layout this object
ForeColor The PDF object fore color
(Inherited from PdfDrawableObject)
Gradient The PDF object gradient color
(Inherited from PdfDrawableObject)
LineStyle The style of the lines rendered by this object
(Inherited from PdfDrawableObject)
MultiPage Controls if the all the frames in the image are rendered in PDF. This property is true by default and each frame in the image is rendered in a new PDF page
Opacity The element opacity as a value between 0 which means completely transparent to 100 which means completely opaque. The object is completely opaque by default
(Inherited from PdfDrawableObject)
PreserveAspectRatio Controls if the aspect ratio of the image is preserved in PDF. This property is true by default
SelectedFrame The index of the frame in a multi frame image selected for rendering. This property is 0 by default and has effect only when MultiPage property is false

Methods

Equals
(Inherited from Object)
Finalize
(Inherited from Object)
GetHashCode
(Inherited from Object)
GetType
(Inherited from Object)
MemberwiseClone
(Inherited from Object)
SetPdfImage(Single, Single, Single, String) Constructs a PDF image from the given image file to be laid out at the given coordinate and in the given width in a PDF canvas. This method can be called only on an empty PDF image
SetPdfImage(Single, Single, Single, Single, String) Constructs a PDF image from the given image file to be laid out at the given coordinate and in the given width in a PDF canvas. The aspect ratio of the image is preserved in PDF. This method can be called only on an empty PDF image
SetPdfImage(Single, Single, Single, Single, Boolean, String) Constructs a PDF image from the given image file to be laid out at the given coordinate and in the given width in a PDF canvas. This method can be called only on an empty PDF image
SetRotationAngle Sets the clockwise rotation angle of the coordinates system before drawing this object in PDF
(Inherited from PdfDrawableObject)
SetScaling Sets the horizontal and vertical scaling of the coordinates system before drawing this object in PDF
(Inherited from PdfDrawableObject)
SetSkewAngles Sets the clockwise skew angles of the coordinates system before drawing this object in PDF
(Inherited from PdfDrawableObject)
SetTranslation Sets the horizontal and vertical translation of the coordinates system before drawing this object in PDF
(Inherited from PdfDrawableObject)
ToString
(Inherited from Object)

Events

PageCreatingEvent This event can be used to configure the PDF page before starting layouting. For example, it is possible to set a custom header and footer for page or to hide the header and footer from page. The event handler must be set before adding this object to a page
PageLayoutingEndedEvent The event is raised after the converter finished to layout the objects in a PDF page. This event can be used to layout PDF objects in the foreground of the PDF page after the main HTML content was laid out in page. The event handler must be set before adding this object to a page
PageLayoutingEvent The event is raised when the Image object prepares to layout the objects in a PDF page. This event can be used to layout PDF objects in the background of the PDF page before the main HTML content is laid out in page. The event handler must be set before adding this object to a page

See Also