CodeIgniter Forums

Full Version: PDF on browser, save button does not work.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Unknown[/eluser]
Okay so, I've created a pdf file using Crystal reports (call it using exec() ) then sent it back to CI to open in the browser. All the buttons are working (zoom, print, etc) but not the save button. Don't know what the problem is.. If it's the adobe plugin, permissions etc.. Help please Smile

Here's my code..

Code:
function report()
{
  $date1 = $this->input->post('date1');
  $date2 = $this->input->post('date2');
  $module = $this->session->userdata('tabs');
  $filename = date("mdY").$module['r_sales_invoice']['cRPTDetail'];
  $arg = $filename.",".$date1.",".$date2;
  echo exec("C:/Users/SERVER/Desktop/ReportConsole3/ReportCreator $arg");
  
  $this->output->set_content_type('application/pdf')->set_output(file_get_contents('C:/Users/SERVER/Desktop/ReportConsole3/'.$filename.'.pdf'));
  
}