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

example

  1. <?php
  2.  
  3. /**
  4.  * Adds various chunks of HTML code in a DOCX file
  5.  *
  6.  * @category   Phpdocx
  7.  * @package    examples
  8.  * @subpackage intermediate
  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.2
  15.  */
  16. require_once '../../classes/CreateDocx.inc';
  17.  
  18. $docx new CreateDocx();
  19.  
  20. $html '
  21. <div class="index_destacado clear">
  22.  
  23.   <h3 style="margin-bottom: 0; padding-bottom: 0">Dynamical generation of DOCX</h3>
  24.   <h4 style="font-size: 14px; color: #999999; margin-top: 0; font-weight: bold; margin-bottom: 18px">
  25.     Conversion plugin to PDF, DOC, HTML, ODT, ...
  26.   </h4>
  27.   <div class="index_destacado_left">
  28.       <p class="subtitle"><strong>PHPDocX</strong> is a <strong>PHP library</strong> designed to generate completely dynamic, fully customizable and digitally signed Word documents.</p>
  29.        <a href="http://www.phpdocx.com/download" class="download_home">Download Now PHPDocX</a>
  30.       <p class="plus-info">or <a href="http://www.phpdocx.com/demo" title="Try our Online Demo">Try our Online Demo!</a></p>
  31.       <p>You may create native .docx reports extracting data directly <strong>from any database or spreadsheet</strong> and export them to other popular formats (PDF, DOC, HTML, ODT, ...) with the help of the conversion plugin. These reports may include editable graphs (only docx), images, tables, headers, footers, etcetera.</p>
  32.       <p>PHPDocX can create, and digitally sign if required, <strong>Word documents</strong> from scratch or use predefined templates to simplify your work. With a few lines of code you may integrate PHPDocX in your website or intranet and offer a valuable service to your customers and employees.</p>
  33.   </div>
  34.  
  35.   <div class="index_destacado_right">
  36.       <div class="compatible">
  37.         <h5>
  38.           100% compatibility:
  39.           <img width="100" src="http://www.phpdocx.com/sites/all/themes/zen_phpdocx/images/100_compatibility.gif" alt="100% compatibility">
  40.         </h5>
  41.       </div>
  42.       <div class="index_destacado_video">
  43.      <img width="400" src="http://www.phpdocx.com/sites/all/themes/zen_phpdocx/images/composite_home.png" alt="PHPDocx">
  44.       </div>
  45.       <div id="digital-signature">
  46.         <h3>
  47.           <a title="Digital Signature for DOCX and PDF documents" href="http://www.phpdocx.com/documentation/digital-signature-docx-pdf-PHP">Digitally sign your Word and PDF documents with PHPDocX</a>
  48.         </h3>
  49.         <p>Add a digital signature to your Word and PDF documents: on your server and just with PHP.</p>
  50.       </div>
  51.   </div>
  52. </div>';
  53.  
  54. $docx->addHTML(array('html' => $html));
  55.  
  56. $docx->createDocx('../docx/example_html');

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