PHP: PDF_fit_image - Manual

downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

PDF_fit_pdi_page PDF_findfont

Last updated: Fri, 26 Jan 2007

view this page in

# PDF_fit_image

(PECL)

PDF_fit_image -- Place image or template

## Описание

bool PDF_fit_image ( resource pdfdoc, int image, float x, float y, string optlist )

Places an image or template on the page, subject to various options. Возвращает `TRUE` в случае успешного завершения или `FALSE` в случае возникновения ошибки.

add a note User Contributed Notes
PDF_fit_image
adrian dot suter at epfl dot ch
13-Nov-2006 12:41
`Hello php cracks
First of all, the reference point of the image is its left, bottom corner. Furthermore, I just thought it would be nice to know some of the most used options that can be passed using the fifth parameter "string optlist".
Scaling the image (e.g. by a factor of 0.5)
<?php PDF_fit_image ( $pdf, $img, $x, $y, "scale 0.5" ) ?>
Rotating the image (e.g. by an angle of 45 degrees)
<?php PDF_fit_image ( $pdf, $img, $x, $y, "rotate 45" ) ?>
Note: The reference point rotates with the image!
Fitting the image into a virtual box
<?php PDF_fit_image ( $pdf, $img, $x, $y, "boxsize {200 100} fitmethod meet" ) ?>
Note: The box width and height (in Adobe points) would be given in the curly braces. Using the fitmethod "meet", the image would be ratio-scaled to be completely visible. Other methods are "clip" and "slice".
Multiple options can be used at the same time by simply concatenating them using a space. By the way, most pdf functions work exactly the same as the PDFlib functions. So just risk a look into the PFLlib documentations (use a search engine).
Hope this helped! Best regards - Adrian`
add a note
PDF_fit_pdi_page PDF_findfont

Last updated: Fri, 26 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 10:36:09 2007 PST