Reputation: 746
I am used zend and need to print report as in PDF and i want to draw location for image. but i can't find the solution because by i see in site i can only set size of image but can't find how to set location for image yet.
$image = Zend_Pdf_Image::imageWithPath($base."/images/logo_login.png");
$page->drawImage($image, 10, 30, 20, 50);
yes by this code i can't draw location for image. so anyone used to know a bout it , please share it to me. thanks !
Upvotes: 4
Views: 7088
Reputation: 4309
Zend_Pdf
uses the BOTTOM LEFT corner as the origin and uses points (1/72 of an inch) as the unit of measurement.
I don't usually post links to my own stuff so blatantly, but I've seen a number of questions from you recently on how to use Zend_Pdf
and I think you could benefit from reading this article:
http://yetanotherprogrammingblog.com/content/zend_pdf-wrapper-and-sample-code
There is a specific section in that article on using drawImage()
.
Upvotes: 2
Reputation: 14025
drawImage
function get as paramteters the location of the start point (top left) to draw the image and the end point (bottom right). By this coordinates, you can specify the location and the size of the image to draw.
http://framework.zend.com/manual/1.12/en/zend.pdf.drawing.html
public function drawImage(Zend_Pdf_Resource_Image $image, $x1, $y1, $x2, $y2);
Upvotes: -1