* Copyright (c) 2005-2006 Global-Cube Business Solutions, http://www.global-cube.de/ * All rights reserved. * * You are not allowed to sell, rent or lend this software */ /* Global PDF Generator/class.pdf_from_HTML.inc, v2.0 2006/01/15 23:06:13 */ require("C:/Programme/Apache2/htdocs/qbuilder/pdf/FPDF/fpdf.php"); class PDF_FROM_HTML extends FPDF { var $feld = array("","","",""); var $pdf_version = "2.0"; var $produkt = "Undefiniert"; var $scaling = 3.5; var $relPos = null; var $bMargin = 20; function makePDF($objects) { $this->SetAutoPageBreak(false, $this->bMargin); $this->AliasNbPages(); $this->AddPage(); $this->setMargins(10, 30); $this->insertObjects($objects); $this->Output(); } function setFeld ($feld) { $this->feld = $feld; } function Header() { $this -> SetXY(10, 10); //assign Props: $this -> produkt = "Global PDF Generator"; //LucidaSansUnicode 20 $this->SetFont('LucidaSansUnicode','', 20); //Font Color $this->SetTextColor(17, 17,175); //Fill Color $this->SetFillColor(147, 147, 147); //Title $this->Cell(160,7,$this->produkt,0,0,'L'); //LucidaSansUnicode 10 $this->SetFont('LucidaSansUnicode','',10); //Font Color $this->SetTextColor(147, 147, 147); //Niederlassung $this->Cell(60,7,$this->feld[0],0,0,'L'); //Planner Version $this->Cell(60,7,$this->feld[1],0,1,'L'); //Zweite Zeile $this -> SetX(10); //Font Color $this->SetTextColor(255, 255, 255); //Version //$this->Cell(286,4,'PDF Generator Version: '.$this->pdf_version,0,1,'L',1); //Font Color $this->SetTextColor(255, 255, 255); //nach rechts $this->Cell(160,4,'',0,0,'L',1); //Bereich $this->Cell(60,4,$this->feld[2],0,0,'L',1); //Kategorie $this->Cell(60,4,$this->feld[3],0,0,'L',1); //Line break $this->Ln(15); } function Footer() { $datenquelle = 'Datei'; //Position at 1.5 cm from bottom $this->SetY(-15); //Arial italic 8 $this->SetFont('Arial','I',8); //Font Color $this->SetTextColor(147, 147, 147); //Date $timestamp = time(); $date = date("d.m.Y", $timestamp); $time = date("H:i:s", $timestamp); //Date $this->Cell(1,5,'Erstellungsdatum: '.$date . ' - ' . $time,0,0,'L'); //Page number $this->Cell(0,5,'- Seite '.$this->PageNo().'/{nb} -',0,1,'C'); //Arial italic 8 $this->SetFont('Arial','',6); //Copyright information $this->Cell(0,4,'Global PDF Generator Version: ' . $this -> pdf_version . ' Copyright 2005 Global-Cube Business Solutions All rights reserved',0,0,'C'); } function insertObjects($objects) { //FOR Debugging /* echo "
"; print_r($objects); echo ""; */ foreach ($objects['objects'] as $key_object => $object) { $this -> SetFontSize(6); $object = $this -> SetScale($object); $object = $this -> SetPos($object); /* echo "
"; print_r($objects); echo ""; */ $object['TEXT'] = str_replace("