Manuals

 

SetaPDF_ImageStamp::setDimensions()

Description

class SetaPDF_ImageStamp extends SetaPDF_Stamp {
mixed setDimensions ( [float $width=null[, float $height=null[, boolean $aspectRatio=false]]] ) }

Sets the width and/or height of an image.

Parameters

$width

The width of the image in points. If null, it is automatically calculated.

$height

The height of the image in points. If null, it is automatically calculated.

$aspectRatio

Keep aspect ratio.

Version >= 1.7.3: If this parameter is set to true and both width and height are given, the image will be resized so it will fit into the width and height dimension.

Return value

An array holding the new dimensions of the image. The key 'w' holds the width and the key 'h' holds the height.