mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
This commit is contained in:
+24
-24
@@ -3,13 +3,13 @@
|
||||
* Ueberlagerte Klasse fuer die
|
||||
* Erstellung des PDF-Dokumentes
|
||||
*/
|
||||
class PDF extends FPDF
|
||||
class PDF extends FPDF
|
||||
{
|
||||
|
||||
var $tablewidths;
|
||||
var $footerset;
|
||||
var $headerset;
|
||||
|
||||
|
||||
/**
|
||||
* Konstruktor
|
||||
*
|
||||
@@ -36,13 +36,13 @@ class PDF extends FPDF
|
||||
$this->I=0;
|
||||
$this->U=0;
|
||||
$this->HREF='';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* gibt eine Fusszeile aus
|
||||
*
|
||||
*/
|
||||
function Footer()
|
||||
function Footer()
|
||||
{
|
||||
// Check if Footer for this page already exists (do the same for Header())
|
||||
if(!isset($this->footerset[$this->page]) || !$this->footerset[$this->page]) {
|
||||
@@ -53,12 +53,12 @@ class PDF extends FPDF
|
||||
$this->footerset[$this->page] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* gibt eine Kopfzeile aus
|
||||
*
|
||||
*/
|
||||
function Header()
|
||||
function Header()
|
||||
{
|
||||
// Check if Header for this page already exists (do the same for Footer())
|
||||
if(!isset($this->headerset[$this->page]) || !$this->headerset[$this->page]) {
|
||||
@@ -71,27 +71,27 @@ class PDF extends FPDF
|
||||
$this->headerset[$this->page] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Erzeugt eine Tabelle
|
||||
* Erzeugt eine Tabelle
|
||||
* @param $datas Array - 1. Zeile = Spaltenueberschrift
|
||||
* x. Zeile = Eintraege
|
||||
* $lineheight Zeilenhoehe
|
||||
* $aligns Array - enthaelt die ausrichtung der Spalten (L=Left,R=Right,C=Center)
|
||||
*/
|
||||
*/
|
||||
function morepagestable($datas,$lineheight=12,$aligns)
|
||||
{
|
||||
// some things to set and 'remember'
|
||||
$l = $this->lMargin;
|
||||
$startheight = $h = $this->GetY();
|
||||
$startpage = $currpage = $this->page;
|
||||
|
||||
|
||||
// calculate the whole width
|
||||
foreach($this->tablewidths AS $width)
|
||||
{
|
||||
$fullwidth += $width;
|
||||
}
|
||||
|
||||
|
||||
// Now let's start to write the table
|
||||
$r=0;
|
||||
$markline=false;
|
||||
@@ -109,16 +109,16 @@ class PDF extends FPDF
|
||||
//$this->SetLineWidth(0.001);
|
||||
//$this->Line($l,$h,$fullwidth+$l,$h); NO-Line
|
||||
}
|
||||
|
||||
|
||||
//Farben fuer die zeilenmarkierung setzen
|
||||
if($markline)
|
||||
$this->SetFillColor(230,230,230);
|
||||
else
|
||||
else
|
||||
$this->SetFillColor(255,255,255);
|
||||
|
||||
|
||||
$markline=!$markline;
|
||||
|
||||
// write the content and remember the height of the highest col
|
||||
|
||||
// write the content and remember the height of the highest col
|
||||
foreach($data AS $col => $txt)
|
||||
{
|
||||
$this->page = $currpage;
|
||||
@@ -126,15 +126,15 @@ class PDF extends FPDF
|
||||
$align=($r==0)?'C':$aligns[$col];
|
||||
if($r==0) $this->SetFont('Arial','B',$lineheight-2);
|
||||
else $this->SetFont('Arial','',$lineheight-2);
|
||||
|
||||
|
||||
//erste und zweite zeile nicht fuellen da sonst der rahmen verloren geht
|
||||
if($row==0)
|
||||
$this->MultiCell($this->tablewidths[$col],$lineheight,$txt,0,$align,0);
|
||||
else
|
||||
$this->MultiCell($this->tablewidths[$col],$lineheight,$txt,0,$align,1);
|
||||
|
||||
|
||||
$l += $this->tablewidths[$col];
|
||||
|
||||
|
||||
if($tmpheight[$row.'-'.$this->page] < $this->GetY())
|
||||
{
|
||||
$tmpheight[$row.'-'.$this->page] = $this->GetY();
|
||||
@@ -142,7 +142,7 @@ class PDF extends FPDF
|
||||
if($this->page > $maxpage)
|
||||
$maxpage = $this->page;
|
||||
}
|
||||
|
||||
|
||||
// get the height we were in the last used page
|
||||
$h = $tmpheight[$row.'-'.$maxpage];
|
||||
// set the "pointer" to the left margin
|
||||
@@ -156,11 +156,11 @@ class PDF extends FPDF
|
||||
$this->page = $maxpage;
|
||||
$this->SetLineWidth(1.5);
|
||||
//Immer gleich
|
||||
if($h<=660)
|
||||
if($h<=660)
|
||||
$h=660;
|
||||
else
|
||||
else
|
||||
$h=810;
|
||||
|
||||
|
||||
$this->Line($l,$h,$fullwidth+$l,$h);
|
||||
// now we start at the top of the document and walk down
|
||||
for($i = $startpage; $i <= $maxpage; $i++)
|
||||
|
||||
Reference in New Issue
Block a user