Hi, How can I modify the following code snippet to place my logo.jpg in the top-left corner, between the margins of the A4 paper? Ideally I would like to take up the entire width of the paper. Also, does the DPI of the image matter (ie 72 dpi for internet, 300 dpi for print)? Or is there a fixed dimension I should use in mm (we're talking metric here, aren't we?). From common.inc.php PHP: if (is_file($image)){ $size = getimagesize($image); $x = $width - $size[0] + $margins[0]; $y = $current_y; $pdf->Image ($image, $x, $y, $size[0], $size[1]); // use original size $current_y += $size[1]; } Thank you in advance
if you want to place image that will take the entrie width of the page, just create image with that width. Page format used is A4(210 x 297) margins are 20 mm for each side, so width that can be used for image is 170 mm So for 72 DPI image width in pixels should be 477
I tried using 300dpi images, but then they just blow up. So when printed they are still printed as 72dpi images. How can I fix this?
Logo Fuzzy I also had a heck of a time positioning the logo and it still does not look clear. I have used all resolutions, but never comes out clean. I would love to know of a good solution/enhancement to remedy this.
Pdf receipt - logo.jpg Has anyone found a simple solution to include a sharp logo.jpg image in the pdf invoice file? When I use a high resolution picture, it is sharp but cropped (from the left of picture). Then when I gradually decrease the resolution, which is the only way I found to fit the whole logo and find the right size, the picture becomes more and more fuzzy, which is easy to understand why! I might have to drop the fancy header. Thank you, Al