JustinSmall
08-25-2008, 10:25 AM
Alright, creating PDF files on the fly :)
I ran into a little problem...
Fatal error: Class 'PDFlib' not found in /home/icandyde/public_html/pdftest.php
My code is:
<?php
$pdf = pdf_new();
pdf_open_file($pdf, "newpdf.pdf");
pdf_set_info($pdf, "Author", "Justin Small");
pdf_set_info($pdf, "Title", "Testing PDF Creation");
pdf_set_info($pdf, "Creator", "Justin Small");
pdf_set_info($pdf, "Subject", "Testing the creation of a PDF file");
pdf_begin_page($pdf, 612, 1008);
$arial = pdf_findfont($pdf, "Arial", "host", 1);
pdf_setfont($pdf, $arial, 14);
pdf_show_xy($pdf, "This is my PDF test, I hope this works!",50, 400);
pdf_end_page($pdf);
pdf_close($pdf);
echo "<A HREF=\"newpdf.pdf\" TARGET=\"_blank\">Open pdf in a new window $user</A>"
?>
So I figured, lets do a phpinfo(); check :)
Wallah, found nothing about PDF in phpinfo();
Very frustrating!
So now I have to install phplib right???
or is there any easier way going about creating pdf files on the fly???
Thanks for your responses.
I ran into a little problem...
Fatal error: Class 'PDFlib' not found in /home/icandyde/public_html/pdftest.php
My code is:
<?php
$pdf = pdf_new();
pdf_open_file($pdf, "newpdf.pdf");
pdf_set_info($pdf, "Author", "Justin Small");
pdf_set_info($pdf, "Title", "Testing PDF Creation");
pdf_set_info($pdf, "Creator", "Justin Small");
pdf_set_info($pdf, "Subject", "Testing the creation of a PDF file");
pdf_begin_page($pdf, 612, 1008);
$arial = pdf_findfont($pdf, "Arial", "host", 1);
pdf_setfont($pdf, $arial, 14);
pdf_show_xy($pdf, "This is my PDF test, I hope this works!",50, 400);
pdf_end_page($pdf);
pdf_close($pdf);
echo "<A HREF=\"newpdf.pdf\" TARGET=\"_blank\">Open pdf in a new window $user</A>"
?>
So I figured, lets do a phpinfo(); check :)
Wallah, found nothing about PDF in phpinfo();
Very frustrating!
So now I have to install phplib right???
or is there any easier way going about creating pdf files on the fly???
Thanks for your responses.
