PdfImage.ImageSizePosition Method (SizeD, ContentAlignment)

PDF File Writer

PdfImageImageSizePosition Method (SizeD, 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(
	SizeD InputSize,
	ContentAlignment Alignment
)

Parameters

InputSize
Type: PdfFileWriterSizeD
Image display area
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