Displaying UTF characters in the FPDF

It is very easy to show UTF characters in a FPDF generated PDF file. Just use the following conversion function and it will work. Assume you have initialized the FPDF class to $pdf variable and you want to print the string stored in $name variable: $pdf->Write(iconv(“UTF-8”, “ISO-8859-1”, $name)); It worked for me.

Exporting WordPress blog to Blogger

If you ever need to export your wordpress blog to Google Blogger, then you can use a great tool for this I just found – Convert WordPress Export to Blogger. Follow below steps: Export your wordpress blog as XML file. Use the tool above to convert that XML file to blogger compatible import file. Use...

Apache Keep Alive Directive

Today, I was analysing a website for performance improvements using the Page Speed tool by Google. One interesting thing I found out that it was recommending to enable the KeepAlive feature of Apache web server. Usually this is enabled by default, but somehow on the VPS I was working on, it was disabled. So if...

Javascript code to convert date to timestamp

This is not everyday that you need a Javascript function to convert the date and time string to UNIX timestamp. But if you do need this like me, then here it is: function covertToUnixTime(yourDate) { //Subtract 1 from month to accomodate the month start from 0 in the function return new Date(yourDate.substring(6, 10), ((yourDate.substring(0, 2)...

Session issue in IIS with CakePHP

When working on PHP and MySql development we rarely get a chance to install the application on Windows IIS server. And today I was asked to do the same. The first issue was related with mod_rewrite which is easily solved by un-commenting the line – Configure::write(‘App.baseUrl’, env(‘SCRIPT_NAME’)); But the big issue came when I found...

Scroll to top