当前位置: 首页>>代码示例>>PHP>>正文


PHP PHPRtfLite::setOddEvenDifferent方法代码示例

本文整理汇总了PHP中PHPRtfLite::setOddEvenDifferent方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPRtfLite::setOddEvenDifferent方法的具体用法?PHP PHPRtfLite::setOddEvenDifferent怎么用?PHP PHPRtfLite::setOddEvenDifferent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PHPRtfLite的用法示例。


在下文中一共展示了PHPRtfLite::setOddEvenDifferent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testAddHeaderAllException

 /**
  * tests addHeader with expected exception for all page header
  * @expectedException PHPRtfLite_Exception
  */
 public function testAddHeaderAllException()
 {
     $this->_rtf->setOddEvenDifferent();
     $this->_rtf->addHeader(PHPRtfLite_Container_Header::TYPE_ALL);
     $this->_rtf->getContent();
 }
开发者ID:phprtflite,项目名称:phprtflite,代码行数:10,代码来源:PHPRtfLiteTest.php

示例2: PHPRtfLite

Since RTF files are text files, it\'s easy to produce RTF with many programming languages, like Perl, Java, C++, Pascal, COBOL, or Lisp. Perl, for example, has the RTF::Writer module for this purpose.
';
$times12 = new PHPRtfLite_Font(13, 'Times new Roman');
$arial14 = new PHPRtfLite_Font(14, 'Arial', '#000066');
$parFormat = new PHPRtfLite_ParFormat();
//rtf document
$rtf = new PHPRtfLite();
//borders
$borderFormatBlue = new PHPRtfLite_Border_Format(1, '#0000ff');
$borderFormatRed = new PHPRtfLite_Border_Format(2, '#ff0000');
$border = new PHPRtfLite_Border($rtf, $borderFormatBlue, $borderFormatRed, $borderFormatBlue, $borderFormatRed);
$rtf->setBorder($border);
$rtf->setBorderSurroundsHeader();
$rtf->setBorderSurroundsFooter();
//headers
$rtf->setOddEvenDifferent();
$header = $rtf->addHeader(PHPRtfLite_Container_Header::TYPE_LEFT);
$header->writeText("PHPRtfLite class library. Left document header. This is page - <pagenum> of <pagetotal> -", $times12, $parFormat);
$header = $rtf->addHeader(PHPRtfLite_Container_Header::TYPE_RIGHT);
$header->writeText("PHPRtfLite class library. Right document header. This is page - <pagenum> of <pagetotal> -", $times12, $parFormat);
//section 1
$sect = $rtf->addSection();
$sect->setPaperHeight(16);
$sect->setPaperWidth(25);
//Borders overridden: No Borders
$border = PHPRtfLite_Border::create($rtf, 0);
$sect->setBorder($border);
$sect->setSpaceBetweenColumns(1);
$sect->setNumberOfColumns(2);
$sect->setLineBetweenColumns();
writeSectionText($sect, $arial14, $times12, $text, $text2, $text3);
开发者ID:phprtflite,项目名称:phprtflite,代码行数:31,代码来源:document_sections.php


注:本文中的PHPRtfLite::setOddEvenDifferent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。