本文整理汇总了PHP中Spipu\Html2Pdf\Html2Pdf::setTestTdInOnePage方法的典型用法代码示例。如果您正苦于以下问题:PHP Html2Pdf::setTestTdInOnePage方法的具体用法?PHP Html2Pdf::setTestTdInOnePage怎么用?PHP Html2Pdf::setTestTdInOnePage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Spipu\Html2Pdf\Html2Pdf
的用法示例。
在下文中一共展示了Html2Pdf::setTestTdInOnePage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dirname
<?php
/**
* Html2Pdf Library - example
*
* HTML => PDF convertor
* distributed under the LGPL License
*
* isset($_GET['vuehtml']) is not mandatory
* it allow to display the result in the HTML format
*
* @package Html2pdf
* @author Laurent MINGUET <webmaster@html2pdf.fr>
* @copyright 2016 Laurent MINGUET
*/
require_once dirname(__FILE__) . '/../vendor/autoload.php';
use Spipu\Html2Pdf\Html2Pdf;
use Spipu\Html2Pdf\Exception\Html2PdfException;
use Spipu\Html2Pdf\Exception\ExceptionFormatter;
try {
ob_start();
include dirname(__FILE__) . '/res/exemple11.php';
$content = ob_get_clean();
$html2pdf = new Html2Pdf('P', 'A4', 'fr');
$html2pdf->setTestTdInOnePage(false);
$html2pdf->writeHTML($content, isset($_GET['vuehtml']));
$html2pdf->Output('exemple11.pdf');
} catch (Html2PdfException $e) {
$formatter = new ExceptionFormatter($e);
echo $formatter->getHtmlMessage();
}
示例2: _prepareSubObj
/**
* prepare self::$_subobj (used for create the sub Html2Pdf objects
*
* @access protected
*/
protected function _prepareSubObj()
{
$pdf = null;
// create the sub object
self::$_subobj = new Html2Pdf($this->_orientation, $this->_format, $this->_langue, $this->_unicode, $this->_encoding, array($this->_defaultLeft, $this->_defaultTop, $this->_defaultRight, $this->_defaultBottom));
// init
self::$_subobj->setTestTdInOnePage($this->_testTdInOnepage);
self::$_subobj->setTestIsImage($this->_testIsImage);
self::$_subobj->setDefaultFont($this->_defaultFont);
self::$_subobj->parsingCss->css =& $this->parsingCss->css;
self::$_subobj->parsingCss->cssKeys =& $this->parsingCss->cssKeys;
self::$_subobj->extensions = $this->extensions;
// clone font from the original PDF
self::$_subobj->pdf->cloneFontFrom($this->pdf);
// remove the link to the parent
self::$_subobj->parsingCss->setPdfParent($pdf);
}