PdfImage.ImageSizePosition Method (Double, Double, ContentAlignment)

PDF File Writer

PdfImageImageSizePosition Method (Double, Double, ContentAlignment)

Calculates image size to preserve aspect ratio and sets position.

Namespace:  PdfFileWriter
Assembly:  PdfFileWriter (in PdfFileWriter.dll) Version: 1.1.24.0 (1.1.24.0)
Syntax
C#
public PdfRectangle ImageSizePosition(
	double Width,
	double Height,
	ContentAlignment Alignment
)

Parameters

Width
Type: SystemDouble
Image display width
Height
Type: SystemDouble
Image display height
Alignment
Type: System.DrawingContentAlignment
Content alignment

Return Value

Type: PdfRectangle
Adjusted image size and position within area.
Remarks
Calculates best fit to preserve aspect ratio and adjust position according to content alignment argument.
See Also