Esempio n. 1
0
 function pageheader()
 {
     if ($this->title != '') {
         // Table for titles
         switch ($this->orientation) {
             case LANDSCAPE:
                 $atable = new jh_pdf_table(&$this->pdf, &$this->ypos, $this->subx, 812, 30);
                 break;
             case PORTRAIT:
                 $atable = new jh_pdf_table(&$this->pdf, &$this->ypos, $this->subx, 565, 30);
                 break;
         }
         //******************************************************
         $fecha = date("d/m/Y h:m:s");
         $colh = new jh_pdf_text_jhpci(&$this->pdf);
         $colh->setfontsize(26);
         $colr = new jh_pdf_text_jhpci(&$this->pdf);
         $colr->setfontsize($this->pdffontsize);
         $tcol =& $atable->addcolumn($this->title, '*', $colh, $colr);
         $colh = new jh_pdf_text_jhpci(&$this->pdf);
         $colh->setalignment("right");
         $colh->setfontsize($this->pdffontsize);
         $colr = new jh_pdf_text_jhpci(&$this->pdf);
         $colr->setfontsize($this->pdffontsize);
         $dcol =& $atable->addcolumn($fecha . "", '*', $colh, $colr);
         $this->phpgrid->getlookupquery();
         $what = $this->phpgrid->statustext;
         if ($what == '') {
             $what = 'Mostrando todos los registros';
         }
         $data = array($what);
         $atable->addrow($data);
         $atable->endtable();
     }
 }
$table->setcolspacingcolor(false);
$table->setrowspacingwidth(10);
$table->setrowspacingcolor(false);
$table->setbgcolors(array(false));
/* Fill up the table cell by cell from the left to the right
   by calling the addcell() method

   The table is entirely made up out of containers, so that each
   cell can contain more than one object (2 text objects and
   1 barcode object in this case)

   Note that the containers consist of 3 objects but only 2
   pieces of data are passed via the array; in this case the
   last element of the array is used for the remaining objects */
$table->addcell(array("Monday", "1111"));
$table->addcell(array("Tuesday", "2222"));
$table->addcell(array("Wednesday", "3333"));
$table->addcell(array("Thursday", "4444"));
$table->addcell(array("Friday", "5555"));
$table->addcell(array("Saturday", "6666"));
$table->addcell(array("Sunday", "7777"));
/* Close the table (important!) */
$table->endtable();
/* Close the last page */
PDF_end_page($pdf);
/* Close the PDF document */
PDF_close($pdf);
/* Output the current part of the in-memory created PDF document */
print PDF_get_buffer($pdf);
/* Delete the PDFlib object */
PDF_delete($pdf);