I got same problem in Live Server only. But its working on Local Machine. Adds BOM at the start of a file also its not working on Server. But working in local Machine. Some changes need in your Live code.
1. Place the ob_start() in first line of your file.
Example:
ob_start();
$DOCROOTPATH = $_SERVER['DOCUMENT_ROOT'];
$DOCROOTBASEPATH = dirname($_SERVER['DOCUMENT_ROOT']);
include_once($DOCROOTPATH."/lib/commonarray.inc");
include_once($DOCROOTPATH."/includes/class.payslip.php");
include_once($_SERVER['DOCUMENT_ROOT']."/menucontrol.php");
define('FPDF_FONTPATH','fpdf/font/');
require('fpdf/fpdf.php');
2. After the $pdf->Output(),you should place ob_end_flush() in Same File .
Example:
$pdf=new PDF();
$pdf->Open();
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFont('Times','',12);
$pdf->pdfAllPages();
$pdf->Output();
ob_end_flush();
Now go to hit the browser and see the pdf which you want.
(OR)
Some editors adds BOM at the start of a file.
View your file in hex and remove it