本文整理汇总了PHP中PHPRtfLite::setRestartFootnoteNumberEachPage方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPRtfLite::setRestartFootnoteNumberEachPage方法的具体用法?PHP PHPRtfLite::setRestartFootnoteNumberEachPage怎么用?PHP PHPRtfLite::setRestartFootnoteNumberEachPage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPRtfLite
的用法示例。
在下文中一共展示了PHPRtfLite::setRestartFootnoteNumberEachPage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dirname
<?php
$dir = dirname(__FILE__);
require_once $dir . '/../lib/PHPRtfLite.php';
// register PHPRtfLite class loader
PHPRtfLite::registerAutoloader();
//rtf document
$rtf = new PHPRtfLite();
// restart footnote numbering on each page
$rtf->setRestartFootnoteNumberEachPage();
$font = new PHPRtfLite_Font(14, 'Arial', '#000066');
$defaultFontForNotes = new PHPRtfLite_Font(10);
$rtf->setDefaultFontForNotes($defaultFontForNotes);
// section with footnotes
$sect = $rtf->addSection();
$sectionText = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi eget arcu in nisi porttitor dapibus. Vivamus sit amet dolor id justo dignissim porttitor. Nullam a fermentum massa.';
$sect->writeText($sectionText, $font);
$sect->addFootnote('This is a footnote');
$sectionText = 'Fusce pharetra ante felis, nec pharetra massa. Etiam vitae scelerisque tortor. Nunc varius, ante at dignissim imperdiet, enim neque porta augue, vitae euismod purus tellus non nunc. Pellentesque euismod venenatis ligula, eget scelerisque ipsum sagittis a. Morbi vitae nunc nec nisi congue luctus. Proin dictum sagittis nisi, feugiat pharetra est aliquet nec.
Ut ultrices eleifend tellus, vitae vehicula leo ultrices a. Sed et mi a lorem condimentum hendrerit. Cras imperdiet nisi ac odio scelerisque convallis.';
$sect->writeText($sectionText, $font);
$sect->addFootnote('This is a another footnote');
// section with endnotes
$sect = $rtf->addSection();
$sectionText = 'Nulla a ante nec diam egestas tempus. Nullam odio mauris, mattis vitae gravida a, semper a elit.';
$sect->writeText($sectionText, $font);
$sect->addEndnote('This is a endnote');
$sectionText = 'Nulla a ante nec diam egestas tempus. Nullam odio mauris, mattis vitae gravida a, semper a elit.';
$sect->writeText($sectionText, $font);
$sect->addEndnote('This is a another endnote');
// font for footnote and endnote