Pages

Monday, October 25, 2010

FPDF

This article explains how you can create pdf documents in PHP. While I searched google for 'php + pdf', I found so many libraries that one can use. The one that looked simple to use was FPDF.

All you need to do is copy the php files that come along with the FPDF download and paste them in your php 'include' folder and refer to the package in your code.

This is a simple example.

<?php
require('fpdf.php');

$pdf=new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
$pdf->Cell(40,10,'Hello World!');
$pdf->Output();
?>

As shown in the example above, it is relatively simple to use the library. You can find the tutorials here.

You can create some complex pdfs such as the following,

A calender : Soruce Code Demo
A tree : Source Code Demo
Javascript support : Source Code Demo

You can find more such samples here. I hope you guys find it useful.

Sunday, October 10, 2010

Installing Ubuntu using Wubi

I have published this article today (10.10.10) to coincide with the release of 'Maverick Meerkat'

What do we normally do with PCs or laptops at home?

  • View Photos
  • Watch Movies
  • Listen to Music
  • Browse the Internet
  • Play Games
And in very rare cases, work with MS Office or do some random programming

The fact is, we dont need Windows Vista or Windows 7 to do the things mentioned above. Windows Vista/7 takes up a lot of RAM and is damn slow in starting up. And we invariably end of using a pirated version of windows which is always prone to virus attacks. For so many years I wanted to work with an linux operating system, but i was always scared of the installation process. I was scared that I might accidentally format one of my hard disks.

About an year ago, I got to know about Wubi from a colleague of mine. Wubi is nothing but an easy way to install Ubuntu on your personal computer. If you want to try out Ubuntu on your PC for a short period of time, Wubi is your best choice. Wubi installs Ubuntu on your PC as just another application on windows, but actually it installs an OS itself in your PC. That is how easy the whole installation is. Shown below is the snapshot of the installation screen.



It does look that simple, it really does. Choose any drive in your PC where you have sufficient amount of free space. I would suggest to choose 10GB as the installation size. Once you click on Install, it takes about 3-4 mts for Ubuntu to get installed. You need to reboot once and you will be shown with an option to load Ubuntu during the boot process. And thats it !! There you are, a new, stable and fast OS installed in your PC in absolutely no time.

It might take couple of days to get started with Ubuntu.You are not presented with the old problem of mounting the hard disks and USB drives of previous years. Everything is already done for you. The OS comes with pre-installed software that cover up all your basic needs.

Now, let us look at the pros and cons

Pros
  • Stable, Secure, Fast Operating system - you dont need to worry about virus attacks
  • No need to burn CDs. The iso is sufficient for the installation.
  • 100% Free
  • All basic software already installed
  • An alternate way to recover files if your Windows OS is infected by virus
  • Free upgrade of the OS available every 6 months.
  • Online repository of free software available.
  • Good forums available to answer all your queries and a very activity community.

Cons
  • Ubuntu installed using Wubi is not as fast as it can be. To get the full speed of an OS, you need to install it using the traditional procedure.
  • By default, Ubuntu does not support mp3 and other audio/video formats. This is done to avoid legal issues. To overcome this, you need to install VLC or install unrestricted-audio-packages from the online repository.
  • You might face some problems if you have graphic cards installed. This problem however has been fixed from Ubuntu 9.10 (Karmic Koala)
  • Few of your special keys in your keyboard might not work. For instance, your wifi-enable or bleutooth-enable key might not work on the keyboard. Workaround is to boot up the OS with those features already enabled.
If you guys face any problem in the installation or in using the OS, you can contact me at rmnforever@gmail.com or post your queries at Ubuntu forums