Creating a PDF with PHP?

rob_wasley35

New Member
Messages
1
Reaction score
0
Points
0
I wrote a script to create a simple pdf, and when i try running it on my site all i get is...
Code:
[B]Fatal error[/B]:  Call to undefined function  pdf_new() in [B]/home/halfdown/public_html/test/pdftest.php[/B] on line [B]2[/B]
Does the PHP libraries support the creation of PDF files?
If so then can someone tell me what i may be doing wrong?
 

lemon-tree

x10 Minion
Community Support
Messages
1,420
Reaction score
46
Points
48
If I remember correctly, the native PDFlib is not available on free hosting, hence the error that its instantiating function is not defined.
However, you can instead use one of these: http://www.fpdf.org/ or http://www.tcpdf.org/ . My personal preference is to use TCPDF and I did successfully get it to work on free hosting without any major issues.
 
Top