function output($options = null) {

    // Add page text
    $this->_add_page_text();

    if ( isset($options["compress"]) && $options["compress"] != 1 )
      $this->_pdf->set_value("compress", 0);
    else
      $this->_pdf->set_value("compress", 6);

    $this->_close();

    if ( self::$IN_MEMORY )
      $data = $this->_pdf->get_buffer();

    else {
      $data = file_get_contents($this->_file);

      //debugpng
      if (DEBUGPNG) print '[pdflib output unlink '.$this->_file.']';
      if (!DEBUGKEEPTEMP)

      unlink($this->_file);
      $this->_file = null;
      unset($this->_file);
    }

    return $data;
  }
Пример #2
0
 function output($options = null)
 {
     // Add page text
     $this->_add_page_text();
     if (isset($options["compress"]) && $options["compress"] != 1) {
         $this->_pdf->set_value("compress", 0);
     } else {
         $this->_pdf->set_value("compress", 6);
     }
     $this->_close();
     if (self::$IN_MEMORY) {
         $data = $this->_pdf->get_buffer();
     } else {
         $data = file_get_contents($this->_file);
         //debugpng
         if ($this->_dompdf->get_option("debugPng")) {
             print '[pdflib output unlink ' . $this->_file . ']';
         }
         if (!$this->_dompdf->get_option("debugKeepTemp")) {
             unlink($this->_file);
         }
         $this->_file = null;
         unset($this->_file);
     }
     return $data;
 }
Пример #3
0
 function output($options = null)
 {
     // Add page text
     $this->_add_page_text();
     if (isset($options["compress"]) && $options["compress"] != 1) {
         $this->_pdf->set_value("compress", 0);
     } else {
         $this->_pdf->set_value("compress", 6);
     }
     $this->_close();
     if (self::$IN_MEMORY) {
         $data = $this->_pdf->get_buffer();
     } else {
         $data = file_get_contents($this->_file);
         unlink($this->_file);
         $this->_file = null;
     }
     return $data;
 }