# example

1. <?php
3. /**
4. * Inserts blocks of text with different line spacings.
5. *
6. * @category Phpdocx
7. * @package examples
8. * @subpackage easy
9. * @copyright Copyright (c) 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 3.0
13. * @link http://www.phpdocx.com
14. * @since File available since Release 3.0
15. */
16. require_once '../../classes/CreateDocx.inc';
18. $docx = new CreateDocx();
20. $text = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, ' .
21. 'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.';
23. $paramsText = array(
24. 'b' => 'single',
25. 'font' => 'Arial',
26. 'lineSpacing' => 240
27. );
29. $docx->addText($text, $paramsText);
31. $text = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, ' .
32. 'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.';
34. $paramsText = array(
35. 'b' => 'single',
36. 'font' => 'Arial',
37. 'lineSpacing' => 480
38. );
40. $docx->addText($text, $paramsText);
42. $text = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, ' .
43. 'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.';
45. $paramsText = array(
46. 'b' => 'single',
47. 'font' => 'Arial',
48. 'lineSpacing' => 120
49. );
51. $docx->addText($text, $paramsText);
53. $docx->createDocx('../docx/example_text_linespacing');

Documentation generated on Tue, 21 May 2013 17:19:47 +0200 by phpDocumentor 1.4.4