ID: 12333 Updated by: rjs Reported By: [EMAIL PROTECTED] Old Status: Open Status: Closed Bug Type: PDF related Operating System: SuSE Linux 7.1 PHP Version: 4.0.4pl1 New Comment: The PDFlib documentation describes this behavior in Chapter 3.4.1. Also you should check the result of pdf_open_image_file to avoid running into problems later. As it is not possible to copy the complete content of the PDFlib Manual to the PHP Documentation it is recommended to use the original PDFlib manual when working with PDFlib. Previous Comments: ------------------------------------------------------------------------ [2001-07-24 06:24:40] [EMAIL PROTECTED] Hello! I have tested your pdf_open_image_file -function. It fails when I use gif-pictures that have a color-depth smaller than 16 bits per pixel. That means gifs with 16(4bpp) or 2 colors (b/w) will fail. With 256(16bpp) and 16,7M(24bpp) colors everything runs fine. I used the following simple script for testing it: <?PHP $fp = fopen("test.pdf", "w"); $pdf = pdf_open($fp); $picname="test.gif"; pdf_begin_page($pdf, 595, 842); $pim = pdf_open_image_file($pdf, "gif", $picname); pdf_place_image($pdf, $pim, 50, 100, 1); pdf_close_image($pdf, $pim); pdf_end_page($pdf); pdf_close($pdf); fclose($fp); ?> The output of the script in case of errors was: Warning: Could not open image in /usr/local/httpd/htdocs/regent/pdftest.php on line 8 Warning: Unable to find file identifier 0 in /usr/local/httpd/htdocs/regent/pdftest.php on line 9 Warning: Unable to find file identifier 0 in /usr/local/httpd/htdocs/regent/pdftest.php on line 10 My PHP-commandline is the following: './configure' '--prefix=/usr' '--bindir=/usr/bin' '--libdir=/usr/lib' '--with-exec-dir=%{libdir}/php/bin' '--with-mysql=/usr' '--with-gd=/usr' '--with-imap' '--with-imap-ssl=/usr' '--with-tiff-dir=/usr' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-pdflib=yes' '--with-ldap=yes' '--with-zlib=yes' '--with-xml' '--with-ttf' '--with-readline' '--with-ftp' '--with-ndbm' '--with-gdbm' '--with-mcrypt=/usr/lib/libmcrypt' '--with-mm' '--with-interbase' '--enable-versioning' '--enable-yp' '--enable-bcmath' '--enable-trans-sid' '--enable-inline-optimization' '--enable-track-vars' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-calendar' '--enable-sysvsem' '--enable-sysvshm' '--enable-shmop' '--enable-exif' '--enable-ftp' '--enable-memory-limit' '--enable-wddx' '--enable-filepro' '--enable-dbase' '--with-config-file-path=/etc/httpd' '--with-apxs=/usr/sbin/apxs' '--with-exec-dir=/usr/lib/apache/bin' 'i386-suse-linux-gnu' If this is not a bug, a comment in the documentation could be very useful... Greetings, Christian Gäking ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=12333&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]