pdf ajax call with cakephp | |
---|---|
Subject: | |
references: http://business.cc/Transactions/view/7 you dono'don't load the data from the ajax. just load an iframe with the src | |
2015-03-08 17:00:19 | gstlouis |
$('.PDF-doc').on('click', function(){ //new PDFObject($(data).html()).embed('#PDF-reader');
controller
public function file($id = null){ //load PDF file for transaction $txfile = $this->Transaction->find('first', array( //var_dump($tx['Transaction']['filename']); $file = $this->response->file('/tmp/tests/'.$txfile['Transaction']['filename'].'');
| gstlouis |
2015-03-08 17:00:47 | |