create
[ class tree: create ] [ index: create ] [ all elements ]

example

  1. <?php
  2.  
  3. /**
  4.  * Inserts a simple text in bold Arial font.
  5.  *
  6.  * @category   Phpdocx
  7.  * @package    examples
  8.  * @subpackage easy
  9.  * @copyright  Copyright (c) 2009-2013 Narcea Producciones Multimedia S.L.
  10.  *              (http://www.2mdc.com)
  11.  * @license    http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
  12.  * @version    2013.05.20
  13.  * @link       http://www.phpdocx.com
  14.  * @since      2013.05.20
  15.  */
  16.  
  17. require_once '../../classes/CreateDocx.inc';
  18.  
  19. $docx new CreateDocx();
  20.  
  21. $text 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, ' .
  22.     'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.';
  23.  
  24. $title 'Title....';
  25.  
  26. $options array(
  27.     'color' => 'FF0000',
  28.     'i' => 'on',
  29.     'jc' => 'center',
  30.     'sz' => 13
  31.     );
  32.  
  33. $docx->addHeading($title."1",0);
  34. $docx->addText($text);
  35.  
  36. $docx->addHeading($title."2",3);
  37. $docx->addText($text);
  38.  
  39. $docx->addHeading($title."3",1,$options);
  40. $docx->addText($text);
  41.  
  42. $docx->createDocx('../docx/example_heading');

Documentation generated on Mon, 13 Jan 2014 13:44:07 +0100 by phpDocumentor 1.4.4