title: dompdf page number
body: <p>Hi I am using DOMPDF to generate PDF file, I would like to know how to get page number.</p>
  
  <p>I have try the following as mention in FAQ page of DOMPDF. and not successful.
  NOTE: I also have turn on inline PHP as well as it mention in FAQ</p>
  
  <p>following is my code</p>
  
  <pre><code> &lt;?php
  require_once("dompdf/dompdf_config.inc.php");
  
  
  ob_start();
  //be sure this file exists, and works outside of web context etc.)
  
  
  $dompdf = new DOMPDF();
  
  
  $html="     &lt;script type='text/php'&gt;";
          if ( isset($pdf) ) { 
              $font = Font_Metrics::get_font("yourfont", "normal");
              $size = 9;
              $y = $pdf-&gt;get_height() - 24;
              $x = $pdf-&gt;get_width() - 15 - Font_Metrics::get_text_width("1/1", $font, $size);
              $pdf-&gt;page_text($x, $y, "{PAGE_NUM}/{PAGE_COUNT}", $font, $size);
          } 
  $html.="        &lt;/script&gt;";
  
  $html .="
          aaaaa&lt;br/&gt;aaaaaa&lt;br/&gt;aaaaaa&lt;br/&gt;aaaaa&lt;br/&gt;aaaaaa&lt;br/&gt;aaaaaa&lt;br/&gt;aaaa&lt;br/&gt;aaaaa&lt;br/&gt;aaaaaa&lt;br/&gt;aaaaa&lt;br/&gt;
          aaaaa&lt;br/&gt;aaaaaaa&lt;br/&gt;aaaaaa&lt;br/&gt;
  aaaaa&lt;br/&gt;aaaaaa&lt;br/&gt;
          aaaaaaa&lt;br/&gt;aaaaaaaaaa&lt;br/&gt;aaaaaaaaaaaaaaaaa&lt;br/&gt;aaaaaaaaaaaaaaaaa&lt;br/&gt;aaaaaaaaaaaaaaaaa&lt;br/&gt;aaaaaaaaaaaaaaaaa&lt;br/&gt;
          aaaaaaa&lt;br/&gt;aaaaaaaaaa&lt;br/&gt;aaaaaaaaaaaaaaaaa&lt;br/&gt;aaaaaaaaaaaaaaaaa&lt;br/&gt;aaaaaaaaaaaaaaaaa&lt;br/&gt;aaaaaaaaaaaaaaaaa&lt;br/&gt;
          aaaaaaaa&lt;br/&gt;aaaaaaaaa&lt;br/&gt;aaaaaaaaaaaaaaaaa&lt;br/&gt;aaaaaaaaaaaaaaaaa&lt;br/&gt;aaaaaaaaaaaaaaaaa&lt;br/&gt;aaaaaaaaaaaaaaaaa&lt;br/&gt;
          aaaaaaaa&lt;br/&gt;aaaaaaaaa&lt;br/&gt;aaaaaaaaaaaaaaaaa&lt;br/&gt;aaaaaaaaaaaaaaaaa&lt;br/&gt;aaaaaaaaaaaaaaaaa&lt;br/&gt;aaaaaaaaaaaaaaaaa&lt;br/&gt;
          aaaaaaaa&lt;br/&gt;aaaaaaaaa&lt;br/&gt;aaaaaaaaaaaaaaaaa&lt;br/&gt;aaaaaaaaaaaaaaaaa&lt;br/&gt;aaaaaaaaaaaaaaaaa&lt;br/&gt;aaaaaaaaaaaaaaaaa&lt;br/&gt;
          aaaaaaaaa&lt;br/&gt;aaaaaaaa&lt;br/&gt;aaaaaaaaaaaaaaaaa&lt;br/&gt;aaaaaaaaaaaaaaaaa&lt;br/&gt;aaaaaaaaaaaaaaaaa&lt;br/&gt;aaaaaaaaaaaaaaaaa&lt;br/&gt;
          aaaaaaaaaaaaaaaaa&lt;br/&gt;aaaaaaaaaaaaaaaaa&lt;br/&gt;aaaaaaaaaaaaaaaaa&lt;br/&gt;aaaaaaaaaaaaaaaaa&lt;br/&gt;aaaaaaaaaaaaaaaaa&lt;br/&gt;
          &lt;/body&gt;&lt;/html&gt;"; 
  
  
  $dompdf-&gt;load_html($html);
  $dompdf-&gt;render();
  $dompdf-&gt;stream("sample.pdf");
  
  
   ?&gt;
  </code></pre>
  
  <p>Can someone point me out this issue please? where did i make it wrong</p>