title: how to convert dynamic contents of html page to pdf
body: <p>In html page some tags are dynamically created using jquery and contents are loaded from msql db using jquery and php.
  I want convert this dynamic page to pdf.
  I have tried following code but it generate pdf of static part of html page.</p>
  
  <pre><code>&lt;?php
      ob_start();
  ?&gt;
  //html code and internal css, javascript used in external file with jquery library
  &lt;?php
    include('dompdf/dompdf_config.inc.php');
    $contents = ob_get_contents();
    ob_end_clean();
    $dompdf = new DOMPDF();
    $dompdf-&gt;load_html($contents);
    $dompdf-&gt;render();
    $dompdf-&gt;stream('file.pdf'); 
  ?&gt;
  </code></pre>
  
  <p>So how to store contents of dynamic html page in a php variable after processing it ( using javascript/php ) and convert it to pdf usin dompdf or other converter.</p>