I am using the FPDF Library and when I try to make a PDF I'm getting the following error:
Warning: Cannot modify header information - headers already sent by (output started at-----) FPDF error: Some data has already been output, can't send PDF file
//Send to standard output
            if(ob_get_length())
                $this->Error('Some data has already been output, can\'t send PDF file');
            if(php_sapi_name()!='cli')
            {
                //We send to a browser
                header('Content-Type: application/pdf');
                if(headers_sent())
                    $this->Error('Some data has already been output, can\'t send PDF file');
                header('Content-Length: '.strlen($this->buffer));
                header('Content-Disposition: inline; filename="'.$name.'"');
                header('Cache-Control: private, max-age=0, must-revalidate');
                header('Pragma: public');
                ini_set('zlib.output_compression','0');
            }
            echo $this->buffer;
 
     
     
    