garrisonian14 Posted December 12, 2007 Share Posted December 12, 2007 Hi all, I am using following code to create a pdf file and write some text in it using php. $pdf = pdf_new(); pdf_open_file($pdf, "terms.pdf"); pdf_begin_page($pdf, 595, 842); $arial = pdf_findfont($pdf, "Arial", "host", 1); pdf_setfont($pdf, $arial, 10); pdf_show_xy($pdf,"YES you are right", 50, 750); pdf_end_page($pdf); pdf_close($pdf); But i get Fatal error: Call to undefined function: pdf_new() Can anybody please help me how to resolve this, is there any special library needed to include or some settings in php.ini are required. Kindly guide me.... Urgent please. Thanx, Ali Quote Link to comment Share on other sites More sharing options...
lachild Posted December 12, 2007 Share Posted December 12, 2007 The pdf_new(); function is apart of the PECL pdflib library. Have you installed this package? If you have you may want to check your path setup in php.ini to make sure that you're pear and pecl directories are included. Personally I found that FPDF is a bit more straight forward and easier to work with. You may want to take a look at that library as an alternative. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.