Witam, mam dziwny problem, otóż ściągnąłem sobie klase dompdf, która powinna rozwiązać moje wszystkie problemy a tymczasem pododuje kolejne.... ale do rzeczy. Sciagnalem paczke, wypadkowałem, stworzyłem najprostrzy plik index.php a w nim:
  1. <?php
  2. require_once("dompdf_config.inc.php");
  3.  
  4. $html =
  5.  '<html><body>'.
  6.  '<p>Put your html here, or generate it with your favourite '.
  7.  'templating system.</p>'.
  8.  '</body></html>';
  9.  
  10. $dompdf = new DOMPDF();
  11. $dompdf->load_html($html);
  12. $dompdf->render();
  13. $dompdf->stream("sample.pdf");
  14. ?>


oczywiscie w tym samym katalogu co rozpakowana paczka, uruchomilem na localu i otrzymałem takie krzaczki:
Kod
[b]Warning[/b]:  domdocument::domdocument() expects at least 1 parameter, 0 given in [b]C:\xampp\htdocs\dompdf-0.5.1\include\dompdf.cls.php[/b] on line [b]165[/b]



[b]Fatal error[/b]:  Call to undefined method domdocument::loadHTML() in [b]C:\xampp\htdocs\dompdf-0.5.1\include\dompdf.cls.php[/b] on line [b]284


linijka 165 to 3 linijka w tym konstruktorze:
  1. <?php
  2. * Class constructor
  3.   */
  4.  function __construct() {
  5.    $this->_messages = array();
  6.    $this->_xml = new DomDocument();
  7.    $this->_xml->preserveWhiteSpace = true;
  8.    $this->_tree = new Frame_Tree($this->_xml);
  9.    $this->_css = new Stylesheet();
  10.    $this->_pdf = null;
  11.    $this->_paper_size = "letter";
  12.    $this->_paper_orientation = "portrait";
  13.    $this->_base_host = "";
  14.    $this->_base_path = "";
  15.    $this->_cache_id = null;
  16.  }
  17. ?>


a 284 to przedostatnia tutaj:
  1. <?php
  2. // Store parsing warnings as messages
  3.    set_error_handler("record_warnings");
  4.    $this->_xml->loadHTML($str);
  5.    restore_error_handler();[/b]?>


Ktoś wie w czym tkwi problem? w ogóle zzieleniałem smile.gif