hello dear friends ... . i need a help for creating pdf file from php code with mysql database i found soem code from net ... but that is not run return me error .. <?php $mypdf = pdf_new(); pdf_open_file($mypdf, "riz.pdf"); pdf_begin_page($mypdf, 595, 842); $myfont = pdf_findfont($mypdf, "Times-Roman", "host", 0); pdf_setfont($mypdf, $myfont, 10); pdf_show_xy($mypdf, "There are more things in heaven and earth, Horatio,", 50, 750); pdf_show_xy($mypdf, "than are dreamt of in your philosophy", 50, 730); pdf_end_page($mypdf); pdf_close($mypdf); pdf_delete($mypdf); ?> this code return me error ... Fatal error: Call to undefined function pdf_new() in c:\wamp\www\exemples\phpinfo1.php on line 2 help me please what i will do ...
Create a NEW file call it something like "servertest.php" and have this: <?php phpinfo(); ?> Code (markup): Then run it and check the output - you might not have the PDF library installed on your server.
most likely you don't have the extension to use this function. or maybe you need to uncomment or add in the extension_dir="...." in the .ini file. like what Yesideez say - do a phpinfo() check
why not use some free pdf creation libraries? see this: http://best-php-scripts.com/pdf_generation.htm
dear i had download some scripts from your advised site... html 2 fpdf file ... but do not know how to use it .. there is some data get from mysql and display in HTML page ... i want that page in PDF file .... or if any way how to get from database and make in pdf file ... just like i export data from mysql and i make a csv file ...