Controller:
public function test(){
$data = array();
$this->load->library('tcpdf');
$this->display_page($data);
}
test.php: (Not posting all of it, as its a bit long)
global $l;
$l = Array();
$l['a_meta_charset'] = 'UTF-8';
$l['a_meta_dir'] = 'ltr';
$l['a_meta_language'] = 'en';
$l['w_page'] = 'page';
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
-- pdf stuff --
$pdf->Output('example_007.pdf', 'I');
In Chrome, it just says "Failed to load PDF document.". No errors, nothing in console. In firefox, it says: "File does not begin with '%PDF-'. Local\EWH`_'s3-0y".
The string at the end of Local\ appears random with each load.
I have tried using output buffering and flush, to no avail. I am at a loss.