0

Hello daniweb.
I am currently involved in a project were we need to be able to generate confirmation mails, our original thought was to code an html mail, but we quickly deserted that idea. Therefor I need a powerful yet simple PDF class for PHP.
I have no greater interest in making the pdf look good aslong as it has support for images, tables and some of the more basic functions i am pleased
So please point me in the direction of the class that you have experience with and enjoy.

//K0ns3rv

2
Contributors
1
Reply
3
Views
7 Years
Discussion Span
Last Post by venkat0904
1

Hello daniweb.
I am currently involved in a project were we need to be able to generate confirmation mails, our original thought was to code an html mail, but we quickly deserted that idea. Therefor I need a powerful yet simple PDF class for PHP.
I have no greater interest in making the pdf look good aslong as it has support for images, tables and some of the more basic functions i am pleased
So please point me in the direction of the class that you have experience with and enjoy.

//K0ns3rv

here try this...

$pdf = pdf_new();
pdf_open_file($pdf, "filename.pdf");
pdf_begin_page($pdf, 595, 842);  //sets pdf size 595*842 is A4
$png_image = pdf_open_png($pdf, "image.png");  //image that u want to embed. u can also use pdf_open_image instead
pdf_place_image($pdf, $png_image, 200, 300, 1.0);  //parameters: pdf file, image file, x pos, y pos, scale
pdf_close_image($pdf, $png_image);
pdf_show_xy($pdf, "User Name: ".$username ,50, 700);  //normal text
pdf_end_page($pdf);
pdf_close($pdf);

and so on...
U can create a class by urself and pass all values as parameters..
Cheers!!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.