本文整理汇总了PHP中HTML2PDF::setEncoding方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML2PDF::setEncoding方法的具体用法?PHP HTML2PDF::setEncoding怎么用?PHP HTML2PDF::setEncoding使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTML2PDF
的用法示例。
在下文中一共展示了HTML2PDF::setEncoding方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CreateSubHTML
/**
* création d'un sous HTML2PDF pour la gestion des tableaux imbriqués
*
* @param HTML2PDF futur sous HTML2PDF passé en référence pour création
* @param integer marge eventuelle de l'objet si simulation d'un TD
* @return null
*/
function CreateSubHTML(&$sub_html, $cellmargin = 0)
{
// initialisation du sous objet
$sub_html = new HTML2PDF($this->sens, $this->format, $this->langue, array($this->defaultLeft, $this->defaultTop, $this->defaultRight, $this->defaultBottom), true);
$sub_html->isSubPart = true;
$sub_html->setEncoding($this->encoding);
$sub_html->setTestTdInOnePage($this->testTDin1page);
$sub_html->style->css = $this->style->css;
$sub_html->style->css_keys = $this->style->css_keys;
$sub_html->style->table = $this->style->table;
$sub_html->style->value = $this->style->value;
$sub_html->style->value['text-align'] = 'left';
$sub_html->defLIST = $this->defLIST;
$sub_html->style->onlyLeft = true;
// initialisation de la largeur
if ($this->style->value['width']) {
$marge = $cellmargin * 2;
$marge += $this->style->value['padding']['l'] + $this->style->value['padding']['r'];
$marge += $this->style->value['border']['l']['width'] + $this->style->value['border']['r']['width'];
$marge = $sub_html->pdf->w - $this->style->value['width'] + $marge;
} else {
$marge = $this->margeLeft + $this->margeRight;
}
$sub_html->saveMargin(0, 0, $marge);
// initialisation des fontes
$sub_html->pdf->fonts =& $this->pdf->fonts;
$sub_html->pdf->FontFiles =& $this->pdf->FontFiles;
$sub_html->pdf->diffs =& $this->pdf->diffs;
// initialisation des positions et autre
$sub_html->page = $this->page;
$sub_html->maxX = 0;
$sub_html->maxY = 0;
$sub_html->maxH = 0;
$sub_html->pdf->setX(0);
$sub_html->pdf->setY(0);
$sub_html->style->FontSet();
}
示例2: createSubHTML
/**
* création d'un sous HTML2PDF pour la gestion des tableaux imbriqués
*
* @param HTML2PDF futur sous HTML2PDF passé en référence pour création
* @param integer marge eventuelle de l'objet si simulation d'un TD
* @return null
*/
function createSubHTML(&$sub_html, $cellmargin = 0)
{
// calcul de la largueur
if ($this->style->value['width']) {
$marge = $cellmargin * 2;
$marge += $this->style->value['padding']['l'] + $this->style->value['padding']['r'];
$marge += $this->style->value['border']['l']['width'] + $this->style->value['border']['r']['width'];
$marge = $this->pdf->getW() - $this->style->value['width'] + $marge;
} else {
$marge = $this->margeLeft + $this->margeRight;
}
//clonage
$sub_html = new HTML2PDF($this->sens, $this->format, $this->langue, array($this->defaultLeft, $this->defaultTop, $this->defaultRight, $this->defaultBottom));
$sub_html->setIsSubPart();
$sub_html->setEncoding($this->encoding);
$sub_html->setTestTdInOnePage($this->testTDin1page);
$sub_html->setTestIsImage($this->testIsImage);
$sub_html->setTestIsDeprecated($this->testIsDeprecated);
$sub_html->setDefaultFont($this->defaultFont);
$sub_html->style->css = $this->style->css;
$sub_html->style->css_keys = $this->style->css_keys;
$sub_html->pdf->cloneFontFrom($this->pdf);
$sub_html->style->table = $this->style->table;
$sub_html->style->value = $this->style->value;
$sub_html->style->setOnlyLeft();
$sub_html->setNewPage($this->format, $this->sens);
$sub_html->initSubHtml($marge, $this->page, $this->defLIST);
// initialisation des positions et autre
$sub_html->maxX = 0;
$sub_html->maxY = 0;
$sub_html->maxH = 0;
$sub_html->pdf->setXY(0, 0);
}