mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-18 15:32:17 +00:00
This commit is contained in:
@@ -25,6 +25,30 @@ require_once("fpdf.php");
|
||||
|
||||
|
||||
class MyPdf extends FPDF {
|
||||
|
||||
/**
|
||||
* Konstruktor
|
||||
*
|
||||
* @param $orientation: p oder portrait = Hochformat
|
||||
* l oder landscape = Querformat
|
||||
*
|
||||
* $unit: pt = Point
|
||||
* mm = Millimeter
|
||||
* cm = Zentimeter
|
||||
* in = Inch
|
||||
*
|
||||
* $format: A3
|
||||
* A4
|
||||
* A5
|
||||
* letter
|
||||
* legal
|
||||
*/
|
||||
function MyPdf($orientation='P',$unit='mm',$format='A4')
|
||||
{
|
||||
//Call parent constructor
|
||||
$this->FPDF($orientation,$unit,$format);
|
||||
}
|
||||
|
||||
/**
|
||||
* Additional getter methods
|
||||
**/
|
||||
|
||||
@@ -55,8 +55,20 @@ class XslFo2PDF {
|
||||
echo "Didn't find root node<br>";
|
||||
return false;
|
||||
}
|
||||
|
||||
$pdf = new MyPDF();
|
||||
|
||||
// oesi - Format und orientation auslesen
|
||||
$masterpage = $rootNode->getElementsByTagName('simple-page-master');
|
||||
$format = 'A4';
|
||||
$orient = 'P';
|
||||
foreach ($masterpage as $x=>$mp)
|
||||
{
|
||||
if($mp->getAttribute('format')!='')
|
||||
$format = $mp->getAttribute('format');
|
||||
if($mp->getAttribute('orientation')!='')
|
||||
$orient = $mp->getAttribute('orientation');
|
||||
}
|
||||
|
||||
$pdf = new MyPDF($orient, 'mm', $format);
|
||||
$root = new FO_Root($pdf);
|
||||
$this->initDefaults($pdf, $root);
|
||||
if ($root->parse($rootNode) === false) {
|
||||
|
||||
Reference in New Issue
Block a user