Guest User

Untitled

a guest
Jul 12th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. $this->load->library('html2pdf');
  2.  
  3. $this->html2pdf->folder('./assets/pdfs/');
  4. $this->html2pdf->filename('email_test.pdf');
  5. $this->html2pdf->paper('a4', 'portrait');
  6.  
  7. $data = array(
  8. 'title' => 'PDF Created',
  9. 'message' => 'Hello World!'
  10. );
  11. //Load html view
  12. $this->html2pdf->html($this->load->view('pdf', $data, true));
  13.  
  14. //Check that the PDF was created before we send it
  15. $path = $this->html2pdf->create('save');
Add Comment
Please, Sign In to add comment