Register Lost your password?

public function fAddHeader(string text = ‘Cabecera’, string arrParamsHeader = array())

Parameters

text

  • Text of the header



$arrParamsHeader

  • ‘name’ (image path) : ‘img/image.png’, …
  • ’sizeX’ (image width) : 1000, …
  • ’sizeY’ (image height) : 1000, …
  • ’spacingTop’ (spacing top) : 100, …
  • ’spacingBottom’ (spacing bottom) : 100, …
  • ’spacingLeft’ (spacing left) : 100, …
  • ’spacingRight’ (spacing right) : 100, …
  • ‘textWrap’ (text wrap): 0 (inline) , 1 (square), 2 (front), 3 (back), 4 (top and bottom), 5 (clear)
  • ‘jc’ (aligment) : right, center
  • ‘border’ (border size) : 1,2,3 …
  • ‘borderDiscontinuous’(border discontinuous) : 0, 1
  • ’scaling’ (% of size) 50, 100…
  • ‘font’ (A specific size and style of font type within a type family. Example ‘Times New Roman’, ‘Arial’,…)

Examples

Example 1 Version Pro


require_once('../classes/cCreateDocx.inc');
$objDocx = new cCreateDocx();
  $arrParamsHeader = array(
    'name' => '../files/image1.jpg',
    'jc' => 'right',
    'textWrap' => 5
  );

  $objDocx->fAddHeader('Texto de cabecera', $arrParamsHeader);
  $objDocx->fCreateDocx('ejemplo_Cabecera_y_pie.docx');

Your comments