Commit d5af0c7c by sn

mcPDF Anpassungen (links ... )

1 parent e1d67982
Showing with 14 additions and 4 deletions
......@@ -10,16 +10,20 @@ class mcFPDF extends FPDF {
$param_fpdf->Cell($param_width, 7, $param_value, 0, 0, $param_align);
}
public static function tab_setHeadLine(FPDF $param_fpdf, array $param_values, array $param_table_parameter=null) {
public static function tab_setHeadLine(FPDF $param_fpdf, array $param_values, array $param_table_parameter=null, $param_left= 10) {
$param_fpdf->SetFont('Arial', 'B', 8);
self::tab_setLine($param_fpdf, $param_values, $param_table_parameter);
// Linienfarbe auf schwarz einstellen
$param_fpdf->SetDrawColor(0, 0, 0);
// $param_fpdf->SetDrawColor(0, 0, 0);
// Linienbreite einstellen, 0.2 mm
$param_fpdf->SetLineWidth(0.2);
// $param_fpdf->SetLineWidth(0.2);
// Linien zeichnen
$param_fpdf->Line(10, $param_fpdf->getY(), 186, $param_fpdf->getY());
// $param_fpdf->Line($param_left, $param_fpdf->getY(), 186, $param_fpdf->getY());
// $param_fpdf->Line($param_left, $param_fpdf->getY(), 0, $param_fpdf->getY());
$param_fpdf->ncLine(0.2, array(0, 0, 0));
// $param_fpdf->Line(20, 40, 222, 40);
$param_fpdf->Ln(3);
}
......@@ -41,7 +45,13 @@ class mcFPDF extends FPDF {
if(count($param_table_parameter['leftPostions']) == count($param_values)) {
foreach($param_values as $id => $value) {
if(array_key_exists($id+1, $param_table_parameter['leftPostions'])) {
self::setCell($param_fpdf, $value, $param_table_parameter['leftPostions'][$id]['pos'], $param_table_parameter['leftPostions'][$id+1]['pos']-$param_table_parameter['leftPostions'][$id]['pos'], $param_table_parameter['leftPostions'][$id]['align']);
} else {
// echo $param_fpdf->lMargin.' | '.$param_fpdf->rMargin.'<br/>';
self::setCell($param_fpdf, $value, $param_table_parameter['leftPostions'][$id]['pos'], $param_fpdf->rMargin-$param_table_parameter['leftPostions'][$id]['pos'], $param_table_parameter['leftPostions'][$id]['align']);
}
}
}
$param_fpdf->Ln($param_table_parameter['linesize']);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!