PDF certificate

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I need to write a PHP script that e-mails a PDF certificate (not
cryptography=85  just a congrats cert)  to someone.  The certificate
needs to have the person's name and address on it, so the PHP script
must modify the PDF.  Any ideas on how to do this?

Re: PDF certificate

On 10/5/2011 6:31 AM, bob wrote:
Quoted text here. Click to load it

Start reading here:

Good luck!

Erwin Moller

"That which can be asserted without evidence, can be dismissed without
-- Christopher Hitchens

Re: PDF certificate

On Tue, 4 Oct 2011 21:31:59 -0700 (PDT), in comp.lang.php bob

Quoted text here. Click to load it

I use tcpdf (http://www.tcpdf.org ).
To save yourself a lot of work; create an image of your certificate.
You can use this as a background for the PDF page.

class myPDF extends TCPDF {
  //---- set custom header and footer
    public function Footer() {}
$pdf = new myPDF('L','mm','LETTER');
//--- set the margins to zero
$pdf->SetAutoPageBreak(false, PDF_MARGIN_BOTTOM);
//--- use an image for the background
$pdf->Image("images/cert1.gif", 0, 0, 279.25, 215.5, 'gif');
//--- position and output custom text
$pdf->SetXY( 35, 21 );    $pdf->Cell(130, 0, $sName, 0, 0, 'L');
//--- output the page
$pdf->Output("results/pdf/".$code.".pdf", "F");

Site Timeline