Re: Re: pdflib put a image to a pdf file

From: Date: Wed, 14 Feb 2001 14:21:50 +0000
Subject: Re: Re: pdflib put a image to a pdf file
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-5564@lists.php.net to get a copy of this message
I've never tried, but I'm wandering if it is related to the GIF licensing issue that forced GIF's out of the GD libraries - does anyone know if the same happenned to the PDF libraries? Tom Jason Hoover wrote: > Rainer, > > Here is sample code for placing a .jpg image in pdf. Anyone out there get > .gif images to work. I tried the code below without results (PHP Version > 4.0.4pl1 running as cgi on Win NT). > > $fp = fopen("test.pdf", "w"); // pdf file to be > created > $pdfObject = PDF_open($fp); // creation > of pdf oblject > PDF_begin_page($pdfObject, $pageWidth, $pageHeight); // Start First Page > PDF_add_outline($pdfObject, "Page 1"); // Add Bookmark for > Indexing > > // JPG example > $im = PDF_open_jpeg($pdfObject, "imageName.jpg"); // Assign image to > variable > pdf_place_image($pdfObject, $im, 100, 300, 1); // Place image > pdf_close_image($pdfObject, $im); // close image > > // GIF example > $im = PDF_open_gif($pdfObject, "apache_pb.gif"); // Assign image to variable > pdf_place_image($pdfObject, $im, 100, 300, 1); // Place image > pdf_close_image($pdfObject, $im); // close image > > PDF_end_page($pdfObject); // End Page > PDF_close($pdfObject); // Close PDF Object > fclose($fp); // Close PDF File > > Jason Hoover > Web Application Programmer > > Entolo > 2299 Territorial Road > St. Paul, MN 55114 > Phone: 763.847.8022 > Fax: 763.642.1600 > jhoover@entolo.com > www.entolo.com > > -----Original Message----- > From: Rainer Schaaf [mailto:rjs@pdflib.com] > Sent: Thursday, February 14, 2002 4:06 AM > To: php-windows@lists.php.net > Cc: glenn.lindgren@sverige.nu > Subject: [PHP-WIN] Re: pdflib put a image to a pdf file > > > Hallo! > > I got this problem, I can't insert a image to the pdf > > document. I useing " pdf_place_image($pdfdoc, "test.gif", 100, 100, 1); > > " > > Is it anybody got a tip.. > > > You should first open the image with pdf_open_image_file pdf_place_image > expects a handle to an already opend image. The PDFlib manual which > comes with the PDFlib sourcedistribution contains some examples. > > > Best regards. > > //Glenn > > > > ................................................................ > > 80.000 svenskar har nu gratis e-post på Sverige.nu! > > > > -- > Rainer Schaaf rjs@pdflib.com http://www.pdflib.com > _______PDFlib - a library for generating PDF on the fly________ > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > For additional commands, e-mail: php-windows-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.windows (#5564) next »