本文整理汇总了PHP中PHPRtfLite::addFooter方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPRtfLite::addFooter方法的具体用法?PHP PHPRtfLite::addFooter怎么用?PHP PHPRtfLite::addFooter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPRtfLite
的用法示例。
在下文中一共展示了PHPRtfLite::addFooter方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PHPRtfLite
<?php
require_once 'src/PHPRtfLite.php';
PHPRtfLite::registerAutoloader();
require_once 'includes/cars_pdo.php';
if (isset($_POST['download'])) {
try {
$rtf = new PHPRtfLite();
// Установить свойства страницы
$rtf->setMargins(2.54, 2.54, 2.54, 2.54);
$rtf->setPaperFormat(PHPRtfLite::PAPER_LETTER);
// Добавить футер
$footer = $rtf->addFooter();
$fontFooter = new PHPRtfLite_Font(8, 'Arial', '#000000');
$alignFooter = new PHPRtfLite_ParFormat(PHPRtfLite_ParFormat::TEXT_ALIGN_CENTER);
$footer->writeText('Used cars for sale - <pagenum>', $fontFooter, $alignFooter);
// Определить шрифты
$fontH1 = new PHPRtfLite_Font(16, 'Arial', '#4E9C93');
$fontH2 = new PHPRtfLite_Font(14, 'Arial', '#4E9C93');
$fontP = new PHPRtfLite_Font(12, 'Helvetica', '#000000');
// Вертикальное форматирование текста
$formatH1 = new PHPRtfLite_ParFormat();
$formatH1->setSpaceAfter(8);
$formatH2 = new PHPRtfLite_ParFormat();
$formatH2->setSpaceAfter(6);
$formatP = new PHPRtfLite_ParFormat();
$formatP->setSpaceAfter(3);
// Содержание страницы
$section = $rtf->addSection();
$section->writeText('Used Cars for Sale', $fontH1, $formatH1);
while ($row = getRow($result)) {
示例2: testAddFooter
/**
* tests addFooter
*/
public function testAddFooter()
{
$footer = $this->_rtf->addFooter();
$this->assertInstanceOf('PHPRtfLite_Container_Footer', $footer);
}