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 ...
help please.. create pdf file from php code
Moderator: General Moderators
- The_Anomaly
- Forum Contributor
- Posts: 196
- Joined: Fri Aug 08, 2008 4:56 pm
- Location: Tirana, Albania
Re: help please.. create pdf file from php code
On the manual it says:
EDIT: And please remember to use the code=php tags. It makes the posts look a lot cleaner.
Do you have the PECL extension for PDFlib installed? That would certainly explain PHP not recognizing the pdf_new() function.PECL pdflib:1.0-2.1.3
EDIT: And please remember to use the code=php tags. It makes the posts look a lot cleaner.
Re: help please.. create pdf file from php code
thanks dear for reply
dear what is PECL extension and how its use?
dear what is PECL extension and how its use?
- The_Anomaly
- Forum Contributor
- Posts: 196
- Joined: Fri Aug 08, 2008 4:56 pm
- Location: Tirana, Albania
Re: help please.. create pdf file from php code
The_Anomaly wrote:Well, "Dear," Google Is Your Best Friend.
dear PECL pdflib:1.0-2.1.3 is a paid version .. ... do you have or know any free version