PHPLibs
Posted: Thu Jul 30, 2009 11:18 am
i am running
PHP Version 5.2.6
http://sbh.mpadusa.com/phpinfo.php
i think that PHPLibs are installed properly as i see
pdf
PDF Support enabled
PDFlib GmbH Binary-Version 7.0.2
PECL Version 2.1.3
Revision $Revision: 1.5.2.4 $
I was trying to run a scrip that i found on a web site
But it gives me a corrupted PDF file what can i do?
http://sbh.mpadusa.com/mz.pdf (link to the pdf file)
Thanks
PHP Version 5.2.6
http://sbh.mpadusa.com/phpinfo.php
i think that PHPLibs are installed properly as i see
PDF Support enabled
PDFlib GmbH Binary-Version 7.0.2
PECL Version 2.1.3
Revision $Revision: 1.5.2.4 $
I was trying to run a scrip that i found on a web site
Code: Select all
<?php
// create handle for new PDF document
$pdf = pdf_new();
// open a file
pdf_open_file($pdf, "mz.pdf");
// start a new page (A4)
pdf_begin_page($pdf, 595, 842);
// get and use a font object
$arial = pdf_findfont($pdf, "Arial", "host", 1); pdf_setfont($pdf, $arial, 10);
// print text
pdf_show_xy($pdf, "Lets see if this works,", 50, 750); pdf_show_xy($pdf, "than are dreamt of in your philosophy", 50, 730);
// add an image under the text
$image = pdf_open_image_file($pdf, "jpeg", "shakespeare.jpg"); pdf_place_image($pdf, $image, 50, 650, 0.25);
// end page
pdf_end_page($pdf);
// close and save file
pdf_close($pdf);
?>http://sbh.mpadusa.com/mz.pdf (link to the pdf file)
Thanks