Register Lost your password?

public function fAddTextBox(array(’text’ => $texto, ‘args’ => $arrParamsText), $arrParamsBox = array())

Parameters

$arrParamsBox

  • ‘margin_top’ (top margin): 100,..
  • ‘margin_bottom’ (bottom margin): 100, ..
  • ‘margin_right’ (right margin): 100, ..
  • ‘margin_left’ (left margin): 100, ..
  • ‘width’ (width): 800, ..
  • ‘height’ (height): 800, ..
  • ‘align’(text alignment): right, center
  • ‘fillcolor’ (fill color): red,black,…
  • ‘jc’ (text box alignment): square, through
  • ‘font’ (A specific size and style of font type within a type family. Example ‘Times New Roman’, ‘Arial’,…)


$arrParamsText (type = array)

  • ‘b’ (bold): ’single’
  • ‘color’ (color RGB): FF0000, 000000, FFFFFF,…
  • ‘i’ (italic): ’single’
  • ‘jc’ (text alignment): ‘left’, ‘center’, ‘right’, ‘both’, ‘distribute’
  • ’sz’ (size): 1, 2, 3, 4,…
  • ‘u’ (underline): ’single’, ‘words’, ”double’, ‘dotted’, ‘dash’, ‘wave’
  • ‘pageBreakBefore’ (forces a page break before a paragraph): on, off
  • ‘widowControl’ (prevents Word from printing the last line of a paragraph by itself at the top of a new page (widow) or the first line of a paragraph at the bottom of a page (orphan)): on, off
  • ‘wordWrap’ (allows line breaks in the middle of a word): on, off

Examples

Example 1 Version Pro


 require_once('../classes/cCreateDocx.inc');
$objDocx = new cCreateDocx();
$arrParamsText = array('b' => 'single');
$texto = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.';
$arrParamsBox = array('jc' => 'through');
$objDocx->fAddTextBox(array('text' => $texto, 'args' => $arrParamsText), $arrParamsBox);
$objDocx->fCreateDocx('ejemplo_text_box');

Your comments