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();
     }
 }
Esempio n. 2
0
/* Adjust some table parameters */
$table->setverttableborderwidth(1);
$table->setverttablebordercolor(0);
$table->setcolspacingwidth(1);
$table->setcolspacingcolor(0);
$table->setrowspacingwidth(1);
$table->setrowspacingcolor(0);
$table->setheaderbgcolor(0.85);
$table->setbgcolors(array(false, 0.95));
/* Adjust the bgcolor of the barcode cell to to white, because
   some barcode readers might get into trouble otherweise */
$col4->normcellparam->bgcolor = 1;
/* Adjust the cell padding on the left and the right side of
   the barcode column, so that the table lines don't interfere
   with the barcode */
$col4->normcellparam->leftpadding = 10;
$col4->normcellparam->rightpadding = 10;
/* Loop through the elements of the example table */
foreach ($exampletable as $data) {
    $table->addrow($data);
}
/* 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);