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


PHP CreateDocx::addFooter方法代码示例

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


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

示例1: CreateDocx

<?php

//path to  the CreateDocx class within your PHPDocX installation
require_once '../../../classes/CreateDocx.inc';
$docx = new CreateDocx();
//Create a Word fragment with an image to be inserted in the header of the document
$imageOptions = array('src' => '../../img/image.png', 'dpi' => 300);
$default = new WordFragment($docx, 'defaultFooter');
$default->addImage($imageOptions);
$first = new WordFragment($docx, 'firstFooter');
$first->addText('first page footer.');
$even = new WordFragment($docx, 'evenFooter');
$even->addText('even page footer.');
$docx->addFooter(array('default' => $default, 'first' => $first, 'even' => $even));
//add some text
$docx->addText('This is the first page of a document with different footers for the first and even pages.');
$docx->addBreak(array('type' => 'page'));
$docx->addText('This is the second page.');
$docx->addBreak(array('type' => 'page'));
$docx->addText('This is the third page.');
$docx->createDocx('example_addFooter_2');
开发者ID:Ezyva2015,项目名称:SMSF-Academy-Wordpress,代码行数:21,代码来源:sample_2.php

示例2: CreateDocx

<?php

//path to  the CreateDocx class within your PHPDocX installation
require_once '../../../classes/CreateDocx.inc';
$docx = new CreateDocx();
//Create a Word fragment with an image to be inserted in the header of the document
$imageOptions = array('src' => '../../img/image.png', 'dpi' => 300);
$footerImage = new WordFragment($docx, 'defaultFooter');
$footerImage->addImage($imageOptions);
$docx->addFooter(array('default' => $footerImage));
//add some text
$docx->addText('This document has a footer with just one image.');
$docx->createDocx('example_addFooter_1');
开发者ID:Ezyva2015,项目名称:SMSF-Academy-Wordpress,代码行数:13,代码来源:sample_1.php

示例3: CreateDocx

<?php

/**
 * Create a DOCX file. Footer example
 *
 * @category   Phpdocx
 * @package    examples
 * @subpackage easy
 * @copyright  Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L.
 *             (http://www.2mdc.com)
 * @license    LGPL
 * @version    2.0
 * @link       http://www.phpdocx.com
 * @since      File available since Release 2.0
 */
require_once '../../classes/CreateDocx.inc';
$docx = new CreateDocx();
$paramsFooter = array('font' => 'Times New Roman');
$docx->addFooter('Footer. Times New Roman font', $paramsFooter);
$docx->createDocx('example_footer');
开发者ID:AquinoTest,项目名称:PHP-Digital-Format-Convert-Epub-Mobi-PDF,代码行数:20,代码来源:Footer.php

示例4: CreateDocx

<?php

/**
 * Create a DOCX file. Header and footer with font styles
 *
 * @category   Phpdocx
 * @package    examples
 * @subpackage intermediate
 * @copyright  Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L.
 *             (http://www.2mdc.com)
 * @license    LGPL
 * @version    2.0
 * @link       http://www.phpdocx.com
 * @since      File available since Release 2.0
 */
require_once '../../classes/CreateDocx.inc';
$docx = new CreateDocx();
$paramsHeader = array('name' => '../files/img/image.png', 'jc' => 'right', 'textWrap' => 5, 'font' => 'Arial');
$docx->addHeader('Header Arial', $paramsHeader);
$paramsHeader = array('font' => 'Times New Roman');
$docx->addHeader('Header Times New Roman', $paramsHeader);
$paramsFooter = array('pager' => 'true', 'pagerAlignment' => 'center', 'font' => 'Arial');
$docx->addFooter('Footer Arial', $paramsFooter);
$docx->createDocx('example_header_and_footer');
开发者ID:aodkrisda,项目名称:PHP-Digital-Format-Convert-Epub-Mobi-PDF,代码行数:24,代码来源:HeaderAndFooter.php


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