$xx = isset($c->x) ? $c->x + @$this->xx : $x;
$yy = isset($c->y) ? $c->y + @$this->yy : $y + ($lineno * $size * 1.3);
$lineno++;
- $val = @$c->content;
+ $val = isset($c->content) ? $c->content : '';
if (isset($c->args)) {
$val = vsprintf($val,$args);
- if ($has_template && ($font == 'Big5')) {
+ if ($has_template && ($font == 'Big5')) {
require_once 'Text/ZhDetect.php';
$detect = new Text_zhDetect;
$type = $detect->guess($val);
$weight,
$size);
} else {
+ $vv = $val;
$val = @iconv('utf8', 'BIG5//IGNORE', $val);
+ //var_dump(array($vv, $val));
$pdf->setFont('Big5' ,
$weight,
$size);
}
- }
+ }
/*
}
$talign = $align;
- if ((!@$this->children[$i+1] || !strlen(trim(@$this->children[$i+1]->content))) && ($align == 'J')) {
+ if ((empty($this->children[$i+1]) || !isset($this->children[$i+1]->content) || !strlen(trim($this->children[$i+1]->content))) && ($align == 'J')) {
$talign = 'L';
}
-
-
-
+
function multiLine(&$pdf,$lines,$x,$y,$h,$align) {
// now dealing with mm
- XML_SvgToPDFAlt::debug("MULTILINE " .implode("\n",$lines) . " $x, $y, $h");
+ XML_SvgToPDFAlt::debug("MULTILINE '" .implode("\n",$lines) . "' $x, $y, $h");
$yoffset = 0;
$line = -1;
foreach ($lines as $l=>$v) {