December 2001
Intermediate to advanced
520 pages
13h 42m
English
While it is nice to be able to add lines and other shapes to your PDFs, to really add pizzazz, you can incorporate existing images. Using images in PDFs is essentially a three-step process:
1. |
Open the image file.
|
2. |
Place the image in the PDF.
|
3. |
Close the image.
|
In actuality it can be a little more complicated than that once you take into account variable image size and such, but I've got a work-around for that issue, too.
For the most recent versions of PHP, open the image with pdf_open_image_file().
$image_pointer = pdf_open_image_file ($pdf, $format, $image_file);
Exactly like creating a PDF, you assign a pointer to the open image file. The $format should refer to the format of the image itself: JPEG, GIF, PNG, or TIFF ...
Read now
Unlock full access