note 17608 added to function.pdf-open-image-file

From: Date: Mon, 17 Dec 2001 02:51:37 +0000
Subject: note 17608 added to function.pdf-open-image-file
Groups: php.notes 
Request: Send a blank email to php-notes+get-22957@lists.php.net to get a copy of this message
when using pdf_open_image_file() with multipage tiffs, the example in the manual won't work (i don't think the function returns -1 like it says) you can use this instead; for ($page=1; ; $page++) { // our image $image=pdf_open_image_file($pdf,"tiff",$file,"page",$page); // a bad image - page cannot be 0 $bad=pdf_open_image_file($pdf,"tiff",$file,"page",0);<br> if ($image == $bad) { // done adding pages break; } pdf_begin_page($pdf,$width,$height); pdf_place_image($pdf,$image,0,0,1); pdf_close_image($pdf,$image); pdf_end_page($pdf); } -- http://www.php.net/manual/en/function.pdf-open-image-file.php http://master.php.net/manage/user-notes.php?action=edit+17608 http://master.php.net/manage/user-notes.php?action=delete+17608 http://master.php.net/manage/user-notes.php?action=reject+17608

« previous php.notes (#22957) next »