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

example

  1. <?php
  2.  
  3. /**
  4.  * Inserts an external MHT file into a Word document.
  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    2012.12.26
  13.  * @link       http://www.phpdocx.com
  14.  * @since      File available since Release 2.4
  15.  */
  16. require_once '../../classes/CreateDocx.inc';
  17.  
  18. $docx new CreateDocx();
  19.  
  20. $docx->addText('MHT content');
  21.  
  22. $docx->addMHT(array('pathMHT' => '../files/Web.mht'));
  23.  
  24. $docx->addText('We are now going to insert the MHT in a table cell:');
  25.  
  26.  
  27. $MHTdata $docx->addMHT(array('pathMHT' => '../files/Web.mht''rawWordML' => true));
  28.  
  29. $fragment $docx->createWordMLFragment($MHTdata);
  30.  
  31. $valuesTable array(
  32.     array(
  33.         11,
  34.         12
  35.     ),
  36.     array(
  37.         $fragment,
  38.         22
  39.     ),
  40. );
  41.  
  42. $paramsTable array(
  43.     'border' => 'single',
  44.     'border_sz' => 5,
  45. );
  46.  
  47. $test $docx->addTable($valuesTable$paramsTable);
  48.  
  49. $docx->addText('End MHT content');
  50.  
  51. $docx->createDocx('../docx/example_mht');

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