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.
Category: Blog
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)...
Installing Skype on Fedora 14
Download the latest Skype rpm from the Skype website, current version is skype beta 2.1.x. There are some prerequisites which need to be installed for Skype to work on Fedora 14. They are as below : yum install libXv.i686* yum install libXScrnSaver.i686* yum install qt.i686 yum install qt-x11*.i686 Now install the Skype using the package...
Installing Adobe Air 2.x on Fedora 14 64 bit
First change to root user:
sudo -i
Install xterm:
yum install xterm
Install Fedora 32 bit dependencies:
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...
Merge the remote changes before pushing again : Git Message
When you try to push to a GIT Repository and you get this message that mean’s that someone else has changed the repo after your last fetch. In this case you have to incorporate their changes before you can add yours, it is easier to ‘rebase’ rather than merge, just follow the below steps. $...
Using AjaxHelper for pagination in CakePHP 1.3
I am using CakePHP since last 5 years, and am quite used to of “AjaxHelper” for developing Ajax features using CakePHP. But from version 1.3 CakePHP has started deprecating the “AjaxHelper” replacing it with new “JsHelper”, which can be used with many JS libraries. While AjaxHelper is still there for people like me. There is...
Migration to Debian linux from Windows Vista – Day 1
Since I have started developing web applications, it was my dream to migrate to Linux OS some day. But due to the lack of knowledge and to avoid the pain of configuring and installing everything, I avoided this shift, or you can say that I am afraid of moving to Linux. But now after working...