Downloading show garbage on the screen

I have PHP code for downloading pdf files from mysql database. The code is working fine in firefox mozilla and google chrome but not in IE 10, it show garbage in the screen. I have debugged the code with some headers utilities to examine the headers request, it appear the headers is not sending back to the user agent (IE browser) it just blank.

my php code

<?php
ob_start();
$company =$_GET['company'];
if(isset($_GET['id']))
{
  $id = intval($_GET['id']);
  if($id <= 0)
  {
    die('The ID is invalid!');
  }
  else
  {
    $dbLink = new mysqli('localhost', 'sqldata', 'sqldata', 'balhaf');
    if(mysqli_connect_errno())
    {
      die("MySQL connection failed: ". mysqli_connect_error());
    }
    $query = "SELECT mime, name, size, data FROM $company WHERE id = $id";
    $result = $dbLink->query($query);
    if($result)
    {
      if($result->num_rows == 1) {
        $row = mysqli_fetch_assoc($result);
        $size = $row['size'];
        $filename = $row['name'];
        $data = $row['data'];
        $mime = $row['mime'];
        ini_get('zlib.output_compression');
        ini_set('zlib.output_compression', 'Off');
        header('Content-Type: application/pdf');
        while (@ob_end_clean());
        header('Content-Disposition: attachment; filename='.($filename));
        header('Content-Length:'.($size));
        echo $data;
        exit();
      }
      else
      {
        echo 'Error! No image exists with that ID.';
      }
      mysqli_free_result($result);
    }
    else
    {
      echo "Error! Query failed: <pre>{$dbLink->error}</pre>";
    }
    mysqli_close($dbLink);
  }
}
else
{
  echo 'Error! No ID was passed.';
}
?>