I have tried something like
public function getPdf()
{
$imagePath=C:\Users\Hp\Desktop\image.jpg;
$image = Zend_Pdf_Image::imageWithPath($imagePath);
$page->drawImage($image, 40,764,240, 820);
$pdf->pages[] = $page;
$pdf->save('new.pdf');
}
It generates PDF with image successfully. But it does not maintain quality of image. i.e height and width of the image get distorted and displays small image.
Can anyone help me in resolving these issues. I want that image displayed should be of full size on the page. Also please note that landscape or portrait images should fit in the page accordingly.