PdfImageElement Class

Represents an image element that can be rendered into a PDF document. Supports positioning, scaling and alignment

Definition

Namespace: Winnovative.Pdf.Next
Assembly: Winnovative.Pdf.Next (in Winnovative.Pdf.Next.dll) Version: 21.0.3
C#
public class PdfImageElement
Inheritance
Object    PdfImageElement

Constructors

PdfImageElement(Byte) Creates a new image element from a byte array
PdfImageElement(String) Creates a new image element from a file path

Properties

Accessibility Accessibility metadata used when the host PdfDocument is tagged. The default structure type for an image is Figure; PDF/UA-1 requires a non-empty AlternateText or ActualText. Set StructureType to Artifact to mark a purely decorative image
ContinuationBottomMargin In a PdfEditor, the distance in points from the bottom of the pages to the lowest point the image can reach on each page, starting with the page where it starts. Has no effect in a PdfDocument, where the bottom margin of the document applies. The default value is 0
ContinuationTopMargin In a PdfEditor, the distance in points from the top of the pages where the image continues to the top of the continued image. Has no effect in a PdfDocument, where the top margin of the document applies. The default value is 0
ContinueOnNextPage When true, an image taller than the space left on the page continues on the next pages: the part that does not fit above the bottom margin is drawn on the following page from the top margin, with the same horizontal position and width, and so on until the whole image is drawn. In a PdfDocument the next pages are new pages and the margins of the document apply. In a PdfEditor the next pages are the following pages of the document, or pages inserted after the current one when InsertContinuationPages is true, and the ContinuationTopMargin and ContinuationBottomMargin properties give the area of the pages the image can use. A rotated image is always drawn on one page. The default value is false: the image is drawn on one page and the part outside the page is cut
EnlargeToFit If true, the image will be enlarged to fit the specified dimensions if needed
Height The target height for the image. If zero, original height is used unless scaling rules apply
HorizontalAlign The horizontal alignment of the image inside the content area of the page, or inside the page in an edited document. When not None, it takes precedence over X
ImageBytes The image content as a byte array. Optional if ImagePath is used
ImagePath The file path to the image. Optional if ImageBytes is used
InsertContinuationPages In a PdfEditor, when true, the pages where the image continues are inserted after the page where it starts, so the following pages of the document keep their content. When false, the default, the image continues on the following pages of the document and new pages are added only at its end. Has no effect in a PdfDocument
KeepAspectRatio If true, the default, the image keeps its aspect ratio when it is scaled to the specified dimensions. If false and both Width and Height are set, the image is stretched to exactly those dimensions
Opacity Opacity of the rendered image (0..1). Default is 1 (fully opaque)
RotationDegrees Rotation angle in degrees applied to the image. Positive values rotate counter-clockwise. Default is 0 (no rotation)
RotationPivot Gets or sets the pivot point used when rotating this image. The pivot determines which point of the image bounding box remains fixed during rotation. The default value is TopLeft
ScaleDownToFit If true, the image will be scaled down to fit the specified dimensions if needed
VerticalAlign The vertical alignment of the image inside the content area of the page, or inside the page in an edited document. When not None, it takes precedence over Y
Width The target width for the image. If zero, original width is used unless scaling rules apply
X The X position of the image, in points and relative to the top left corner of the content area of the page in a document, of the page in an edited document or of the template. Ignored when HorizontalAlign is set
Y The Y position of the image, in points and relative to the top left corner of the content area of the page in a document, of the page in an edited document or of the template. Ignored when VerticalAlign is set

Methods

Equals
(Inherited from Object)
Finalize
(Inherited from Object)
GetHashCode
(Inherited from Object)
GetType
(Inherited from Object)
MemberwiseClone
(Inherited from Object)
ToString
(Inherited from Object)

See Also