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
> [EMAIL PROTECTED]
> www.entolo.com
>
> -----Original Message-----
> From: Rainer Schaaf [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 14, 2002 4:06 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> 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       [EMAIL PROTECTED]        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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP Windows 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]

Reply via email to