Reputation: 3066
I have image with dimension of 961*210. I need to display this images in invoice pdf generation in full page(like banner image) on the top of the logo area.
What are the values I need to set for parameters(x1,y1,x2,y2) in insertLogo()
function?.
$page->drawImage($image, x1, y1, x2, y2);
I tried multiple values but I can't figured it out. please help me?. I need exact coordinates for full page image (like banner image).
Upvotes: 0
Views: 898
Reputation: 1044
Ah the joys of Zend_Pdf. The parameters for the drawImage() method are as follows:
$image = image as created using
$image = Zend_Pdf_Image::imageWithPath($path);
where path is the path to the desired image on the filesystem
Unfortunately working with PDF's is a very manual process, and you are just going to have to try different values until you get it right. Also remember print margins, you'll want to leave a bit of space for this.
Upvotes: 3