title: fatal error in php pdf creation don't know what the error
body: <pre><code>&lt;?php
  $pdf=pdf_new();
  pdf_open_file($pdf, "test.pdf");
  pdf_begin_page($pdf, 595, 842);
  $arial = pdf_findfont($pdf, "Arial", "host", 1); 
  pdf_setfont($pdf, $arial, 10);
  pdf_show_xy($pdf, "There are more things in heaven and earth, Horatio,",50, 750);
  pdf_end_page($pdf);
  pdf_show_xy($pdf, "than are dreamt of in your philosophy", 50,730);
  pdf_close($pdf);
  ?&gt;
  </code></pre>
  
  <p>error is:</p>
  
  <pre>
  Fatal error: Uncaught exception 'PDFlibException' with message 'Function must not be called in 'object' scope' in /var/www/Sample/sam.php:4 
  Stack trace: 
  #0 /var/www/Sample/sam.php(4): pdf_begin_page(Resource id #2, 595, 842) 
  #1 {main} thrown in /var/www/Sample/sam.php on line 4
  </pre>