serverstage Posted February 4, 2011 Share Posted February 4, 2011 Does anybody have an example of what to add to invoicepdf.tpl? I've been trying to wrap my head around this for hours, also using the examples found on the TCPDF website. 0 Quote Link to comment Share on other sites More sharing options...
serverstage Posted February 4, 2011 Author Share Posted February 4, 2011 After searching the forums it was obvious that others might be interested and no solution could be found. So, I'll just answer my own question. But first-off let me say that TCPDF is really hard-core stuff! Would be nicer to have something which converts HTML to PDF... My wish was to move the logo into the header area and make the background black. Resources: http://www.tcpdf.org/examples.php http://www.tcpdf.org/doc/classTCPDF.html http://api.joomla.org/com-tecnick-tcpdf/TCPDF.html#methodCell includes/tcpdf.php templates/{yours}/invoicepdf.tpl ##### Changes to invoicepdf.tpl: $pdf->SetHeaderMargin(PDF_MARGIN_HEADER); $pdf->SetHeaderData('logo.png',50); $pdf->setHeader(); # Logo //$pdf->Image(ROOTDIR.'/images/logo.jpg',20,25); //$pdf->Ln(); ##### Changes to tcpdf.php: # Look for: function Header (around line 2531 in WHMCS v.4.4.2) # insert this line right before the logo is added (4th line in) $this->Rect(0,0,1370,15,'F','',array(0,0,0)); ##### Also had to create the file and directory: includes/images/logo.png And now on to the Footer... 0 Quote Link to comment Share on other sites More sharing options...
brycekmartin Posted February 4, 2011 Share Posted February 4, 2011 Great job on this. I was looking to move my logo up higher on the document as well. I'll be changing to use a PNG instead of a JPG. Thanks for the links to the DOCs. Best of luck. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.