<?php
if($this->session->userdata('is_logged_in')===FALSE){
    redirect('login');
}
header("Content-type: pdf");
header("Content-length: ".$size);
header("Content-Disposition: attachment; filename=".$filename);
header("Content-Disposition: PHP Generate Data");
echo $content;
?> 
