Fix bad merge
This commit is contained in:
parent
73364c2021
commit
39a7271f91
@ -29,21 +29,13 @@ class FPDF_TPL extends FPDF {
|
|||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
var $tpl = 0;
|
var $tpl = 0;
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
=======
|
|
||||||
|
|
||||||
>>>>>>> 4af26c119faa512590faad44e296b64b6c9e1978
|
|
||||||
/**
|
/**
|
||||||
* "In Template"-Flag
|
* "In Template"-Flag
|
||||||
* @var boolean
|
* @var boolean
|
||||||
*/
|
*/
|
||||||
var $_intpl = false;
|
var $_intpl = false;
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
=======
|
|
||||||
|
|
||||||
>>>>>>> 4af26c119faa512590faad44e296b64b6c9e1978
|
|
||||||
/**
|
/**
|
||||||
* Nameprefix of Templates used in Resources-Dictonary
|
* Nameprefix of Templates used in Resources-Dictonary
|
||||||
* @var string A String defining the Prefix used as Template-Object-Names. Have to beginn with an /
|
* @var string A String defining the Prefix used as Template-Object-Names. Have to beginn with an /
|
||||||
@ -55,22 +47,14 @@ class FPDF_TPL extends FPDF {
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
var $_res = array();
|
var $_res = array();
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
=======
|
|
||||||
|
|
||||||
>>>>>>> 4af26c119faa512590faad44e296b64b6c9e1978
|
|
||||||
/**
|
/**
|
||||||
* Last used Template data
|
* Last used Template data
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
var $lastUsedTemplateData = array();
|
var $lastUsedTemplateData = array();
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
=======
|
|
||||||
|
|
||||||
>>>>>>> 4af26c119faa512590faad44e296b64b6c9e1978
|
|
||||||
/**
|
/**
|
||||||
* Start a Template
|
* Start a Template
|
||||||
*
|
*
|
||||||
@ -90,19 +74,11 @@ class FPDF_TPL extends FPDF {
|
|||||||
* @return int The ID of new created Template
|
* @return int The ID of new created Template
|
||||||
*/
|
*/
|
||||||
function beginTemplate($x = null, $y = null, $w = null, $h = null) {
|
function beginTemplate($x = null, $y = null, $w = null, $h = null) {
|
||||||
<<<<<<< HEAD
|
|
||||||
if (is_subclass_of($this, 'TCPDF')) {
|
if (is_subclass_of($this, 'TCPDF')) {
|
||||||
$this->Error('This method is only usable with FPDF. Use TCPDF methods startTemplate() instead.');
|
$this->Error('This method is only usable with FPDF. Use TCPDF methods startTemplate() instead.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
=======
|
|
||||||
if (is_subclass_of($this, 'TCPDF')) {
|
|
||||||
$this->Error('This method is only usable with FPDF. Use TCPDF methods startTemplate() instead.');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
>>>>>>> 4af26c119faa512590faad44e296b64b6c9e1978
|
|
||||||
if ($this->page <= 0)
|
if ($this->page <= 0)
|
||||||
$this->error("You have to add a page to fpdf first!");
|
$this->error("You have to add a page to fpdf first!");
|
||||||
|
|
||||||
@ -140,11 +116,7 @@ class FPDF_TPL extends FPDF {
|
|||||||
);
|
);
|
||||||
|
|
||||||
$this->SetAutoPageBreak(false);
|
$this->SetAutoPageBreak(false);
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
=======
|
|
||||||
|
|
||||||
>>>>>>> 4af26c119faa512590faad44e296b64b6c9e1978
|
|
||||||
// Define own high and width to calculate possitions correct
|
// Define own high and width to calculate possitions correct
|
||||||
$this->h = $h;
|
$this->h = $h;
|
||||||
$this->w = $w;
|
$this->w = $w;
|
||||||
@ -155,7 +127,6 @@ class FPDF_TPL extends FPDF {
|
|||||||
|
|
||||||
if ($this->CurrentFont) {
|
if ($this->CurrentFont) {
|
||||||
$fontkey = $this->FontFamily . $this->FontStyle;
|
$fontkey = $this->FontFamily . $this->FontStyle;
|
||||||
<<<<<<< HEAD
|
|
||||||
$this->_res['tpl'][$this->tpl]['fonts'][$fontkey] =& $this->fonts[$fontkey];
|
$this->_res['tpl'][$this->tpl]['fonts'][$fontkey] =& $this->fonts[$fontkey];
|
||||||
|
|
||||||
$this->_out(sprintf('BT /F%d %.2f Tf ET', $this->CurrentFont['i'], $this->FontSizePt));
|
$this->_out(sprintf('BT /F%d %.2f Tf ET', $this->CurrentFont['i'], $this->FontSizePt));
|
||||||
@ -164,16 +135,6 @@ class FPDF_TPL extends FPDF {
|
|||||||
return $this->tpl;
|
return $this->tpl;
|
||||||
}
|
}
|
||||||
|
|
||||||
=======
|
|
||||||
$this->_res['tpl'][$this->tpl]['fonts'][$fontkey] =& $this->fonts[$fontkey];
|
|
||||||
|
|
||||||
$this->_out(sprintf('BT /F%d %.2f Tf ET', $this->CurrentFont['i'], $this->FontSizePt));
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->tpl;
|
|
||||||
}
|
|
||||||
|
|
||||||
>>>>>>> 4af26c119faa512590faad44e296b64b6c9e1978
|
|
||||||
/**
|
/**
|
||||||
* End Template
|
* End Template
|
||||||
*
|
*
|
||||||
@ -182,7 +143,6 @@ class FPDF_TPL extends FPDF {
|
|||||||
* @return mixed If a template is opened, the ID is returned. If not a false is returned.
|
* @return mixed If a template is opened, the ID is returned. If not a false is returned.
|
||||||
*/
|
*/
|
||||||
function endTemplate() {
|
function endTemplate() {
|
||||||
<<<<<<< HEAD
|
|
||||||
if (is_subclass_of($this, 'TCPDF')) {
|
if (is_subclass_of($this, 'TCPDF')) {
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
return call_user_func_array(array($this, 'TCPDF::endTemplate'), $args);
|
return call_user_func_array(array($this, 'TCPDF::endTemplate'), $args);
|
||||||
@ -190,15 +150,6 @@ class FPDF_TPL extends FPDF {
|
|||||||
|
|
||||||
if ($this->_intpl) {
|
if ($this->_intpl) {
|
||||||
$this->_intpl = false;
|
$this->_intpl = false;
|
||||||
=======
|
|
||||||
if (is_subclass_of($this, 'TCPDF')) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return call_user_func_array(array($this, 'TCPDF::endTemplate'), $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->_intpl) {
|
|
||||||
$this->_intpl = false;
|
|
||||||
>>>>>>> 4af26c119faa512590faad44e296b64b6c9e1978
|
|
||||||
$tpl =& $this->tpls[$this->tpl];
|
$tpl =& $this->tpls[$this->tpl];
|
||||||
$this->SetXY($tpl['o_x'], $tpl['o_y']);
|
$this->SetXY($tpl['o_x'], $tpl['o_y']);
|
||||||
$this->tMargin = $tpl['o_tMargin'];
|
$this->tMargin = $tpl['o_tMargin'];
|
||||||
@ -207,7 +158,6 @@ class FPDF_TPL extends FPDF {
|
|||||||
$this->h = $tpl['o_h'];
|
$this->h = $tpl['o_h'];
|
||||||
$this->w = $tpl['o_w'];
|
$this->w = $tpl['o_w'];
|
||||||
$this->SetAutoPageBreak($tpl['o_AutoPageBreak'], $tpl['o_bMargin']);
|
$this->SetAutoPageBreak($tpl['o_AutoPageBreak'], $tpl['o_bMargin']);
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
$this->FontFamily = $tpl['o_FontFamily'];
|
$this->FontFamily = $tpl['o_FontFamily'];
|
||||||
$this->FontStyle = $tpl['o_FontStyle'];
|
$this->FontStyle = $tpl['o_FontStyle'];
|
||||||
@ -218,28 +168,12 @@ class FPDF_TPL extends FPDF {
|
|||||||
if ($fontkey)
|
if ($fontkey)
|
||||||
$this->CurrentFont =& $this->fonts[$fontkey];
|
$this->CurrentFont =& $this->fonts[$fontkey];
|
||||||
|
|
||||||
=======
|
|
||||||
|
|
||||||
$this->FontFamily = $tpl['o_FontFamily'];
|
|
||||||
$this->FontStyle = $tpl['o_FontStyle'];
|
|
||||||
$this->FontSizePt = $tpl['o_FontSizePt'];
|
|
||||||
$this->FontSize = $tpl['o_FontSize'];
|
|
||||||
|
|
||||||
$fontkey = $this->FontFamily . $this->FontStyle;
|
|
||||||
if ($fontkey)
|
|
||||||
$this->CurrentFont =& $this->fonts[$fontkey];
|
|
||||||
|
|
||||||
>>>>>>> 4af26c119faa512590faad44e296b64b6c9e1978
|
|
||||||
return $this->tpl;
|
return $this->tpl;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
=======
|
|
||||||
|
|
||||||
>>>>>>> 4af26c119faa512590faad44e296b64b6c9e1978
|
|
||||||
/**
|
/**
|
||||||
* Use a Template in current Page or other Template
|
* Use a Template in current Page or other Template
|
||||||
*
|
*
|
||||||
@ -259,7 +193,6 @@ class FPDF_TPL extends FPDF {
|
|||||||
*/
|
*/
|
||||||
function useTemplate($tplidx, $_x = null, $_y = null, $_w = 0, $_h = 0) {
|
function useTemplate($tplidx, $_x = null, $_y = null, $_w = 0, $_h = 0) {
|
||||||
if ($this->page <= 0)
|
if ($this->page <= 0)
|
||||||
<<<<<<< HEAD
|
|
||||||
$this->error('You have to add a page first!');
|
$this->error('You have to add a page first!');
|
||||||
|
|
||||||
if (!isset($this->tpls[$tplidx]))
|
if (!isset($this->tpls[$tplidx]))
|
||||||
@ -273,26 +206,10 @@ class FPDF_TPL extends FPDF {
|
|||||||
$w = $tpl['w'];
|
$w = $tpl['w'];
|
||||||
$h = $tpl['h'];
|
$h = $tpl['h'];
|
||||||
|
|
||||||
=======
|
|
||||||
$this->error('You have to add a page first!');
|
|
||||||
|
|
||||||
if (!isset($this->tpls[$tplidx]))
|
|
||||||
$this->error('Template does not exist!');
|
|
||||||
|
|
||||||
if ($this->_intpl) {
|
|
||||||
$this->_res['tpl'][$this->tpl]['tpls'][$tplidx] =& $this->tpls[$tplidx];
|
|
||||||
}
|
|
||||||
|
|
||||||
$tpl =& $this->tpls[$tplidx];
|
|
||||||
$w = $tpl['w'];
|
|
||||||
$h = $tpl['h'];
|
|
||||||
|
|
||||||
>>>>>>> 4af26c119faa512590faad44e296b64b6c9e1978
|
|
||||||
if ($_x == null)
|
if ($_x == null)
|
||||||
$_x = 0;
|
$_x = 0;
|
||||||
if ($_y == null)
|
if ($_y == null)
|
||||||
$_y = 0;
|
$_y = 0;
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
$_x += $tpl['x'];
|
$_x += $tpl['x'];
|
||||||
$_y += $tpl['y'];
|
$_y += $tpl['y'];
|
||||||
@ -301,16 +218,6 @@ class FPDF_TPL extends FPDF {
|
|||||||
$_w = $wh['w'];
|
$_w = $wh['w'];
|
||||||
$_h = $wh['h'];
|
$_h = $wh['h'];
|
||||||
|
|
||||||
=======
|
|
||||||
|
|
||||||
$_x += $tpl['x'];
|
|
||||||
$_y += $tpl['y'];
|
|
||||||
|
|
||||||
$wh = $this->getTemplateSize($tplidx, $_w, $_h);
|
|
||||||
$_w = $wh['w'];
|
|
||||||
$_h = $wh['h'];
|
|
||||||
|
|
||||||
>>>>>>> 4af26c119faa512590faad44e296b64b6c9e1978
|
|
||||||
$tData = array(
|
$tData = array(
|
||||||
'x' => $this->x,
|
'x' => $this->x,
|
||||||
'y' => $this->y,
|
'y' => $this->y,
|
||||||
@ -322,7 +229,6 @@ class FPDF_TPL extends FPDF {
|
|||||||
'ty' => ($this->h - $_y - $_h),
|
'ty' => ($this->h - $_y - $_h),
|
||||||
'lty' => ($this->h - $_y - $_h) - ($this->h - $h) * ($_h / $h)
|
'lty' => ($this->h - $_y - $_h) - ($this->h - $h) * ($_h / $h)
|
||||||
);
|
);
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
$this->_out(sprintf('q %.4F 0 0 %.4F %.4F %.4F cm', $tData['scaleX'], $tData['scaleY'], $tData['tx'] * $this->k, $tData['ty'] * $this->k)); // Translate
|
$this->_out(sprintf('q %.4F 0 0 %.4F %.4F %.4F cm', $tData['scaleX'], $tData['scaleY'], $tData['tx'] * $this->k, $tData['ty'] * $this->k)); // Translate
|
||||||
$this->_out(sprintf('%s%d Do Q', $this->tplprefix, $tplidx));
|
$this->_out(sprintf('%s%d Do Q', $this->tplprefix, $tplidx));
|
||||||
@ -332,17 +238,6 @@ class FPDF_TPL extends FPDF {
|
|||||||
return array('w' => $_w, 'h' => $_h);
|
return array('w' => $_w, 'h' => $_h);
|
||||||
}
|
}
|
||||||
|
|
||||||
=======
|
|
||||||
|
|
||||||
$this->_out(sprintf('q %.4F 0 0 %.4F %.4F %.4F cm', $tData['scaleX'], $tData['scaleY'], $tData['tx'] * $this->k, $tData['ty'] * $this->k)); // Translate
|
|
||||||
$this->_out(sprintf('%s%d Do Q', $this->tplprefix, $tplidx));
|
|
||||||
|
|
||||||
$this->lastUsedTemplateData = $tData;
|
|
||||||
|
|
||||||
return array('w' => $_w, 'h' => $_h);
|
|
||||||
}
|
|
||||||
|
|
||||||
>>>>>>> 4af26c119faa512590faad44e296b64b6c9e1978
|
|
||||||
/**
|
/**
|
||||||
* Get The calculated Size of a Template
|
* Get The calculated Size of a Template
|
||||||
*
|
*
|
||||||
@ -360,17 +255,12 @@ class FPDF_TPL extends FPDF {
|
|||||||
$tpl =& $this->tpls[$tplidx];
|
$tpl =& $this->tpls[$tplidx];
|
||||||
$w = $tpl['w'];
|
$w = $tpl['w'];
|
||||||
$h = $tpl['h'];
|
$h = $tpl['h'];
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
=======
|
|
||||||
|
|
||||||
>>>>>>> 4af26c119faa512590faad44e296b64b6c9e1978
|
|
||||||
if ($_w == 0 and $_h == 0) {
|
if ($_w == 0 and $_h == 0) {
|
||||||
$_w = $w;
|
$_w = $w;
|
||||||
$_h = $h;
|
$_h = $h;
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
if($_w == 0)
|
if($_w == 0)
|
||||||
$_w = $_h * $w / $h;
|
$_w = $_h * $w / $h;
|
||||||
if($_h == 0)
|
if($_h == 0)
|
||||||
@ -379,22 +269,11 @@ class FPDF_TPL extends FPDF {
|
|||||||
return array("w" => $_w, "h" => $_h);
|
return array("w" => $_w, "h" => $_h);
|
||||||
}
|
}
|
||||||
|
|
||||||
=======
|
|
||||||
if($_w == 0)
|
|
||||||
$_w = $_h * $w / $h;
|
|
||||||
if($_h == 0)
|
|
||||||
$_h = $_w * $h / $w;
|
|
||||||
|
|
||||||
return array("w" => $_w, "h" => $_h);
|
|
||||||
}
|
|
||||||
|
|
||||||
>>>>>>> 4af26c119faa512590faad44e296b64b6c9e1978
|
|
||||||
/**
|
/**
|
||||||
* See FPDF/TCPDF-Documentation ;-)
|
* See FPDF/TCPDF-Documentation ;-)
|
||||||
*/
|
*/
|
||||||
public function SetFont($family, $style = '', $size = 0) {
|
public function SetFont($family, $style = '', $size = 0) {
|
||||||
if (is_subclass_of($this, 'TCPDF')) {
|
if (is_subclass_of($this, 'TCPDF')) {
|
||||||
<<<<<<< HEAD
|
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
return call_user_func_array(array($this, 'TCPDF::SetFont'), $args);
|
return call_user_func_array(array($this, 'TCPDF::SetFont'), $args);
|
||||||
}
|
}
|
||||||
@ -403,32 +282,17 @@ class FPDF_TPL extends FPDF {
|
|||||||
|
|
||||||
$fontkey = $this->FontFamily . $this->FontStyle;
|
$fontkey = $this->FontFamily . $this->FontStyle;
|
||||||
|
|
||||||
=======
|
|
||||||
$args = func_get_args();
|
|
||||||
return call_user_func_array(array($this, 'TCPDF::SetFont'), $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
parent::SetFont($family, $style, $size);
|
|
||||||
|
|
||||||
$fontkey = $this->FontFamily . $this->FontStyle;
|
|
||||||
|
|
||||||
>>>>>>> 4af26c119faa512590faad44e296b64b6c9e1978
|
|
||||||
if ($this->_intpl) {
|
if ($this->_intpl) {
|
||||||
$this->_res['tpl'][$this->tpl]['fonts'][$fontkey] =& $this->fonts[$fontkey];
|
$this->_res['tpl'][$this->tpl]['fonts'][$fontkey] =& $this->fonts[$fontkey];
|
||||||
} else {
|
} else {
|
||||||
$this->_res['page'][$this->page]['fonts'][$fontkey] =& $this->fonts[$fontkey];
|
$this->_res['page'][$this->page]['fonts'][$fontkey] =& $this->fonts[$fontkey];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
=======
|
|
||||||
|
|
||||||
>>>>>>> 4af26c119faa512590faad44e296b64b6c9e1978
|
|
||||||
/**
|
/**
|
||||||
* See FPDF/TCPDF-Documentation ;-)
|
* See FPDF/TCPDF-Documentation ;-)
|
||||||
*/
|
*/
|
||||||
function Image(
|
function Image(
|
||||||
<<<<<<< HEAD
|
|
||||||
$file, $x = '', $y = '', $w = 0, $h = 0, $type = '', $link = '', $align = '', $resize = false,
|
$file, $x = '', $y = '', $w = 0, $h = 0, $type = '', $link = '', $align = '', $resize = false,
|
||||||
$dpi = 300, $palign = '', $ismask = false, $imgmask = false, $border = 0, $fitbox = false,
|
$dpi = 300, $palign = '', $ismask = false, $imgmask = false, $border = 0, $fitbox = false,
|
||||||
$hidden = false, $fitonpage = false, $alt = false, $altimgs = array()
|
$hidden = false, $fitonpage = false, $alt = false, $altimgs = array()
|
||||||
@ -438,41 +302,22 @@ class FPDF_TPL extends FPDF {
|
|||||||
return call_user_func_array(array($this, 'TCPDF::Image'), $args);
|
return call_user_func_array(array($this, 'TCPDF::Image'), $args);
|
||||||
}
|
}
|
||||||
|
|
||||||
=======
|
|
||||||
$file, $x = '', $y = '', $w = 0, $h = 0, $type = '', $link = '', $align = '', $resize = false,
|
|
||||||
$dpi = 300, $palign = '', $ismask = false, $imgmask = false, $border = 0, $fitbox = false,
|
|
||||||
$hidden = false, $fitonpage = false, $alt = false, $altimgs = array()
|
|
||||||
) {
|
|
||||||
if (is_subclass_of($this, 'TCPDF')) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return call_user_func_array(array($this, 'TCPDF::Image'), $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
>>>>>>> 4af26c119faa512590faad44e296b64b6c9e1978
|
|
||||||
$ret = parent::Image($file, $x, $y, $w, $h, $type, $link);
|
$ret = parent::Image($file, $x, $y, $w, $h, $type, $link);
|
||||||
if ($this->_intpl) {
|
if ($this->_intpl) {
|
||||||
$this->_res['tpl'][$this->tpl]['images'][$file] =& $this->images[$file];
|
$this->_res['tpl'][$this->tpl]['images'][$file] =& $this->images[$file];
|
||||||
} else {
|
} else {
|
||||||
$this->_res['page'][$this->page]['images'][$file] =& $this->images[$file];
|
$this->_res['page'][$this->page]['images'][$file] =& $this->images[$file];
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
=======
|
|
||||||
|
|
||||||
return $ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
>>>>>>> 4af26c119faa512590faad44e296b64b6c9e1978
|
|
||||||
/**
|
/**
|
||||||
* See FPDF-Documentation ;-)
|
* See FPDF-Documentation ;-)
|
||||||
*
|
*
|
||||||
* AddPage is not available when you're "in" a template.
|
* AddPage is not available when you're "in" a template.
|
||||||
*/
|
*/
|
||||||
function AddPage($orientation = '', $format = '', $keepmargins = false, $tocpage = false) {
|
function AddPage($orientation = '', $format = '', $keepmargins = false, $tocpage = false) {
|
||||||
<<<<<<< HEAD
|
|
||||||
if (is_subclass_of($this, 'TCPDF')) {
|
if (is_subclass_of($this, 'TCPDF')) {
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
return call_user_func_array(array($this, 'TCPDF::AddPage'), $args);
|
return call_user_func_array(array($this, 'TCPDF::AddPage'), $args);
|
||||||
@ -481,16 +326,6 @@ class FPDF_TPL extends FPDF {
|
|||||||
if ($this->_intpl)
|
if ($this->_intpl)
|
||||||
$this->Error('Adding pages in templates isn\'t possible!');
|
$this->Error('Adding pages in templates isn\'t possible!');
|
||||||
|
|
||||||
=======
|
|
||||||
if (is_subclass_of($this, 'TCPDF')) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return call_user_func_array(array($this, 'TCPDF::AddPage'), $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->_intpl)
|
|
||||||
$this->Error('Adding pages in templates isn\'t possible!');
|
|
||||||
|
|
||||||
>>>>>>> 4af26c119faa512590faad44e296b64b6c9e1978
|
|
||||||
parent::AddPage($orientation, $format);
|
parent::AddPage($orientation, $format);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -499,7 +334,6 @@ class FPDF_TPL extends FPDF {
|
|||||||
*/
|
*/
|
||||||
function Link($x, $y, $w, $h, $link, $spaces = 0) {
|
function Link($x, $y, $w, $h, $link, $spaces = 0) {
|
||||||
if (is_subclass_of($this, 'TCPDF')) {
|
if (is_subclass_of($this, 'TCPDF')) {
|
||||||
<<<<<<< HEAD
|
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
return call_user_func_array(array($this, 'TCPDF::Link'), $args);
|
return call_user_func_array(array($this, 'TCPDF::Link'), $args);
|
||||||
}
|
}
|
||||||
@ -516,29 +350,10 @@ class FPDF_TPL extends FPDF {
|
|||||||
return call_user_func_array(array($this, 'TCPDF::AddLink'), $args);
|
return call_user_func_array(array($this, 'TCPDF::AddLink'), $args);
|
||||||
}
|
}
|
||||||
|
|
||||||
=======
|
|
||||||
$args = func_get_args();
|
|
||||||
return call_user_func_array(array($this, 'TCPDF::Link'), $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->_intpl)
|
|
||||||
$this->Error('Using links in templates aren\'t possible!');
|
|
||||||
|
|
||||||
parent::Link($x, $y, $w, $h, $link);
|
|
||||||
}
|
|
||||||
|
|
||||||
function AddLink() {
|
|
||||||
if (is_subclass_of($this, 'TCPDF')) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return call_user_func_array(array($this, 'TCPDF::AddLink'), $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
>>>>>>> 4af26c119faa512590faad44e296b64b6c9e1978
|
|
||||||
if ($this->_intpl)
|
if ($this->_intpl)
|
||||||
$this->Error('Adding links in templates aren\'t possible!');
|
$this->Error('Adding links in templates aren\'t possible!');
|
||||||
return parent::AddLink();
|
return parent::AddLink();
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
function SetLink($link, $y = 0, $page = -1) {
|
function SetLink($link, $y = 0, $page = -1) {
|
||||||
if (is_subclass_of($this, 'TCPDF')) {
|
if (is_subclass_of($this, 'TCPDF')) {
|
||||||
@ -546,30 +361,16 @@ class FPDF_TPL extends FPDF {
|
|||||||
return call_user_func_array(array($this, 'TCPDF::SetLink'), $args);
|
return call_user_func_array(array($this, 'TCPDF::SetLink'), $args);
|
||||||
}
|
}
|
||||||
|
|
||||||
=======
|
|
||||||
|
|
||||||
function SetLink($link, $y = 0, $page = -1) {
|
|
||||||
if (is_subclass_of($this, 'TCPDF')) {
|
|
||||||
$args = func_get_args();
|
|
||||||
return call_user_func_array(array($this, 'TCPDF::SetLink'), $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
>>>>>>> 4af26c119faa512590faad44e296b64b6c9e1978
|
|
||||||
if ($this->_intpl)
|
if ($this->_intpl)
|
||||||
$this->Error('Setting links in templates aren\'t possible!');
|
$this->Error('Setting links in templates aren\'t possible!');
|
||||||
parent::SetLink($link, $y, $page);
|
parent::SetLink($link, $y, $page);
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
=======
|
|
||||||
|
|
||||||
>>>>>>> 4af26c119faa512590faad44e296b64b6c9e1978
|
|
||||||
/**
|
/**
|
||||||
* Private Method that writes the form xobjects
|
* Private Method that writes the form xobjects
|
||||||
*/
|
*/
|
||||||
function _putformxobjects() {
|
function _putformxobjects() {
|
||||||
$filter=($this->compress) ? '/Filter /FlateDecode ' : '';
|
$filter=($this->compress) ? '/Filter /FlateDecode ' : '';
|
||||||
<<<<<<< HEAD
|
|
||||||
reset($this->tpls);
|
reset($this->tpls);
|
||||||
foreach($this->tpls AS $tplidx => $tpl) {
|
foreach($this->tpls AS $tplidx => $tpl) {
|
||||||
|
|
||||||
@ -577,15 +378,6 @@ class FPDF_TPL extends FPDF {
|
|||||||
$this->_newobj();
|
$this->_newobj();
|
||||||
$this->tpls[$tplidx]['n'] = $this->n;
|
$this->tpls[$tplidx]['n'] = $this->n;
|
||||||
$this->_out('<<'.$filter.'/Type /XObject');
|
$this->_out('<<'.$filter.'/Type /XObject');
|
||||||
=======
|
|
||||||
reset($this->tpls);
|
|
||||||
foreach($this->tpls AS $tplidx => $tpl) {
|
|
||||||
|
|
||||||
$p=($this->compress) ? gzcompress($tpl['buffer']) : $tpl['buffer'];
|
|
||||||
$this->_newobj();
|
|
||||||
$this->tpls[$tplidx]['n'] = $this->n;
|
|
||||||
$this->_out('<<'.$filter.'/Type /XObject');
|
|
||||||
>>>>>>> 4af26c119faa512590faad44e296b64b6c9e1978
|
|
||||||
$this->_out('/Subtype /Form');
|
$this->_out('/Subtype /Form');
|
||||||
$this->_out('/FormType 1');
|
$this->_out('/FormType 1');
|
||||||
$this->_out(sprintf('/BBox [%.2F %.2F %.2F %.2F]',
|
$this->_out(sprintf('/BBox [%.2F %.2F %.2F %.2F]',
|
||||||
@ -598,17 +390,12 @@ class FPDF_TPL extends FPDF {
|
|||||||
// ury
|
// ury
|
||||||
($tpl['h'] - $tpl['y']) * $this->k
|
($tpl['h'] - $tpl['y']) * $this->k
|
||||||
));
|
));
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
=======
|
|
||||||
|
|
||||||
>>>>>>> 4af26c119faa512590faad44e296b64b6c9e1978
|
|
||||||
if ($tpl['x'] != 0 || $tpl['y'] != 0) {
|
if ($tpl['x'] != 0 || $tpl['y'] != 0) {
|
||||||
$this->_out(sprintf('/Matrix [1 0 0 1 %.5F %.5F]',
|
$this->_out(sprintf('/Matrix [1 0 0 1 %.5F %.5F]',
|
||||||
-$tpl['x'] * $this->k * 2, $tpl['y'] * $this->k * 2
|
-$tpl['x'] * $this->k * 2, $tpl['y'] * $this->k * 2
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
$this->_out('/Resources ');
|
$this->_out('/Resources ');
|
||||||
|
|
||||||
@ -626,32 +413,12 @@ class FPDF_TPL extends FPDF {
|
|||||||
if (isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images'])) {
|
if (isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images'])) {
|
||||||
foreach($this->_res['tpl'][$tplidx]['images'] as $image)
|
foreach($this->_res['tpl'][$tplidx]['images'] as $image)
|
||||||
$this->_out('/I' . $image['i'] . ' ' . $image['n'] . ' 0 R');
|
$this->_out('/I' . $image['i'] . ' ' . $image['n'] . ' 0 R');
|
||||||
=======
|
|
||||||
|
|
||||||
$this->_out('/Resources ');
|
|
||||||
|
|
||||||
$this->_out('<</ProcSet [/PDF /Text /ImageB /ImageC /ImageI]');
|
|
||||||
if (isset($this->_res['tpl'][$tplidx]['fonts']) && count($this->_res['tpl'][$tplidx]['fonts'])) {
|
|
||||||
$this->_out('/Font <<');
|
|
||||||
foreach($this->_res['tpl'][$tplidx]['fonts'] as $font)
|
|
||||||
$this->_out('/F' . $font['i'] . ' ' . $font['n'] . ' 0 R');
|
|
||||||
$this->_out('>>');
|
|
||||||
}
|
|
||||||
if(isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images']) ||
|
|
||||||
isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls']))
|
|
||||||
{
|
|
||||||
$this->_out('/XObject <<');
|
|
||||||
if (isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images'])) {
|
|
||||||
foreach($this->_res['tpl'][$tplidx]['images'] as $image)
|
|
||||||
$this->_out('/I' . $image['i'] . ' ' . $image['n'] . ' 0 R');
|
|
||||||
>>>>>>> 4af26c119faa512590faad44e296b64b6c9e1978
|
|
||||||
}
|
}
|
||||||
if (isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls'])) {
|
if (isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls'])) {
|
||||||
foreach($this->_res['tpl'][$tplidx]['tpls'] as $i => $tpl)
|
foreach($this->_res['tpl'][$tplidx]['tpls'] as $i => $tpl)
|
||||||
$this->_out($this->tplprefix . $i . ' ' . $tpl['n'] . ' 0 R');
|
$this->_out($this->tplprefix . $i . ' ' . $tpl['n'] . ' 0 R');
|
||||||
}
|
}
|
||||||
$this->_out('>>');
|
$this->_out('>>');
|
||||||
<<<<<<< HEAD
|
|
||||||
}
|
}
|
||||||
$this->_out('>>');
|
$this->_out('>>');
|
||||||
|
|
||||||
@ -661,17 +428,6 @@ class FPDF_TPL extends FPDF {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
=======
|
|
||||||
}
|
|
||||||
$this->_out('>>');
|
|
||||||
|
|
||||||
$this->_out('/Length ' . strlen($p) . ' >>');
|
|
||||||
$this->_putstream($p);
|
|
||||||
$this->_out('endobj');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
>>>>>>> 4af26c119faa512590faad44e296b64b6c9e1978
|
|
||||||
/**
|
/**
|
||||||
* Overwritten to add _putformxobjects() after _putimages()
|
* Overwritten to add _putformxobjects() after _putimages()
|
||||||
*
|
*
|
||||||
@ -680,17 +436,10 @@ class FPDF_TPL extends FPDF {
|
|||||||
parent::_putimages();
|
parent::_putimages();
|
||||||
$this->_putformxobjects();
|
$this->_putformxobjects();
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
function _putxobjectdict() {
|
function _putxobjectdict() {
|
||||||
parent::_putxobjectdict();
|
parent::_putxobjectdict();
|
||||||
|
|
||||||
=======
|
|
||||||
|
|
||||||
function _putxobjectdict() {
|
|
||||||
parent::_putxobjectdict();
|
|
||||||
|
|
||||||
>>>>>>> 4af26c119faa512590faad44e296b64b6c9e1978
|
|
||||||
if (count($this->tpls)) {
|
if (count($this->tpls)) {
|
||||||
foreach($this->tpls as $tplidx => $tpl) {
|
foreach($this->tpls as $tplidx => $tpl) {
|
||||||
$this->_out(sprintf('%s%d %d 0 R', $this->tplprefix, $tplidx, $tpl['n']));
|
$this->_out(sprintf('%s%d %d 0 R', $this->tplprefix, $tplidx, $tpl['n']));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user