DeeEmm

Pragmatism in code

Pragmatism in code

Waxing lyrical about life the universe and everything software related since lunchtime 2006.

PDF Generation - Add Custom text into footer

This is a quick and dirty hack to add some text to the footer of the PDF's generated within Joomla. The library used to generate the PDF's is the open source TCPDF library - http://www.tcpdf.org To add code into the footer of the generated PDF's, you will need to edit the following file:

/libraries/tcpdf/tcpdf.php

Find the following code in the footer() function

//Print page number
if ($this->rtl) {
$this->SetX($this->original_rMargin);
$this->Cell(0, $footer_height, $pagenumtxt, 'T', 0, 'L');
} else {
$this->SetX($this->original_lMargin);
$this->Cell(0, $footer_height, $pagenumtxt, 'T', 0, 'R');
}

 

Underneath it add the following code - replacing the text with your own

                //DeeEmm footer text hack
                $this->SetY($footer_y);
                $this->Cell(0, 10, 'www.DeeEmm.com', 0, 0, 'C');


Hey presto - you now have additional text in your footer

Delete .DS_Store files
TinyMCE - add items to style drop down
 

Comments

No comments made yet. Be the first to submit a comment
Already Registered? Login Here
Guest
Saturday, 22 July 2017
If you'd like to register, please fill in the username, password and name fields.

Captcha Image