SetTopMargin(0); $tcpdf->SetAuthor("CMC Technologies"); $tcpdf->SetTitle("CMC Technologies Quote"); $tcpdf->SetAutoPageBreak( false ); $tcpdf->setHeaderFont(array($textfont,'',40)); $tcpdf->xheadercolor = array(150,0,0); $tcpdf->xheadertext = 'CMC TECHNOLOGIES'; $tcpdf->xfootertext = 'Copyright © %d CMC Technologies. All rights reserved.'; $tcpdf->Header(); // Now you position and print your page content // example: /*$tcpdf->SetTextColor(0, 0, 0); $tcpdf->SetFont($textfont,'B',20); $tcpdf->Cell(0,14, "Hello World", 0,1,'L'); */ $tcpdf->AddPage(); $tcpdf->DetailsBox(); $content = << Dear Bill,


RE: Awesome Products

Thank you for your enquiry regarding our Awesome Products. Please see the following quotation for:

Item Product
1.0 A Product (TM)
2.0 Another Product

 

Regards,


Sales Engineer

 

Attachments:

attachment1.pdf
attachment2.pdf

 

 

 

 

 

ENDCONTENT; $currentX = $tcpdf->GetX(); $currentY = $tcpdf->GetY(); $tcpdf->SetTextColor(0); $tcpdf->SetFont('times', '', 12); $tcpdf->writeHTMLCell(0, 0, $currentX, $currentY+5, $content, 'LTRB', 1, 0, true, 'L', true); $tcpdf->lastPage(); $tcpdf->AddPage(); //$tcpdf->writeHTML($content, true, 0, true, 0); $tcpdf->lastPage(); $tcpdf->AliasNbPages(); $tcpdf->Output('/var/www/cake/app/webroot/pdf/filename1.pdf', 'F'); ?>