/** * Places an image and scales it. * * @deprecated This function is deprecated, use PDF_fit_image() instead. * * @param ZendPdf\Resource\Image\AbstractImage $image * @param float $x * @param float $y * @param float $scale * @return boolean TRUE on success or FALSE on failure. */ public function place_image(Image\AbstractImage $image, $x, $y, $scale) { $x1 = $x; $y1 = $y; $x2 = $x + $image->getPixelWidth() * $scale; $y2 = $y + $image->getPixelHeight() * $scale; //$image->getWidth() return $this->_page->drawImage($image, $x1, $y1, $x2, $y2); }
public function drawImage(\ZendPdf\Resource\Image\AbstractImage $image, $x1, $y1, $x2, $y2) { $this->convertCoordinatesFromUserSpace($x1, $y1); $this->convertCoordinatesFromUserSpace($x2, $y2); list($y1, $y2) = array($y2, $y1); return parent::drawImage($image, $x1, $y1, $x2, $y2); }
/** * @{inheritDoc} */ public function drawImageOnPage(Page $page, $image, $left, $bottom, $right, $top) { return $page->drawImage($image, $left, $bottom, $right, $top); }