title: php to pdf using dompdf
body: <p>I have following codes for start.</p>
  
  <pre><code>&lt;?
  require('html2fpdf.php');
  $pdf=new HTML2FPDF();
  $pdf-&gt;AddPage();
  $fp = fopen("en/print-job.php?ID=12","r");
  $strContent = fread($fp, filesize("en/print-job.php?ID=12"));
  fclose($fp);
  $pdf-&gt;WriteHTML($strContent);
  $pdf-&gt;Output("home.pdf");
  echo "PDF file is generated successfully!";
  ?&gt;
  </code></pre>
  
  <p>I have a page called print-pdf.php which is built on bootstrap &amp; output is something like this:</p>
  
  <p><a href="https://www.lotomanager.in/en/print-job.php?ID=12" rel="nofollow noreferrer">https://www.lotomanager.in/en/print-job.php?ID=12</a></p>
  
  <p>so how can this page be converted as it is to pdf?</p>
  
  <p>I get following result from above codes: </p>
  
  <blockquote>
    <p>Warning: fopen(en/print-job.php?ID=12): failed to open stream: No such
    file or directory in /home/loto/public_html/pdf.php on line 5</p>
    
    <p>Warning: filesize(): stat failed for en/print-job.php?ID=12 in /home/loto/public_html/pdf.php on line 6</p>
    
    <p>Warning: fread() expects parameter 1 to be resource, boolean given in /home/loto/public_html/pdf.php on line 6</p>
    
    <p>Warning: fclose() expects parameter 1 to be resource, boolean given in /home/loto/public_html/pdf.php on line 7
        PDF file is generated successfully!</p>
  </blockquote>