Register Lost your password?
Full api documentation: full api documentation FREE version full api documentation PRO version

public function addHeader(string text = ‘Header’, string paramsHeader = array())

Parameters

text

  • Text of the header



$paramsHeader

  • ‘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


require_once 'classes/CreateDocx.inc';

$docx = new CreateDocx();

$paramsHeader = array(
    'font' => 'Times New Roman',
    'jc' => 'right',
    'textWrap' => 5,
);

$docx->addHeader('Header text', $paramsHeader);

$docx->createDocx('example_header');

    One Response

  • karthick

    how to add header image in free version

Your comments