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 - To add code into the footer of the generated PDF's, you will need to edit the following file:


Find the following code in the footer() function

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

Continue reading
9912 Hits

TinyMCE - add items to style drop down

If you have to display code snippets on your Joomla site, you might find that the following mod is of help. This quick mod will allow you to add items to the styles drop down in the TinyMCE editor - in this case a style for the code class.

The mod is pretty straight forward.

Normally when TinyMCE is called it looks for a stylesheet called 'editor.css' in the default templates CSS folder. The contents of this are used to propagate the styles drop down. If this file is not found in the default templates CSS folder, then the system version is used instead. To add custom styles to the drop down, simply create the following file. (where current_template is the name of your template)


Continue reading
8415 Hits