title: Generate html page in Codeigniter, print with Wkhtmltopdf
body: <p>I want to create a temporary html page or view dynamically to use Wkhtmltopdf and export it as a PDF document from that file. It is a Codeigniter project (with which I'm not that familiar..) so firstly I am wondering if it is possible? </p>
  
  <p>My approach is simply: </p>
  
  <pre><code>$pdf = new Pdf();
  $pdf-&gt;addPage('http://pageToAdd.php');
  $pdf-&gt;saveAs('/path/to/saveFolder/' . $filename);
  </code></pre>
  
  <p>Which is generating a pdf from the addPage, but I want that page to be created with dynamic contentent fetched from the database so I was thinking that I should load a view, save it temporary and then assign that file as pageToAdd.php. Is this is possible and if so, how and where should I start?</p>