2 require_once '../PHPWord.php';
5 $PHPWord = new PHPWord();
7 // New portrait section
8 $section = $PHPWord->createSection();
11 $header = $section->createHeader();
13 // Add a watermark to the header
14 $header->addWatermark('_earth.jpg', array('marginTop'=>200, 'marginLeft'=>55));
16 $section->addText('The header reference to the current section includes a watermark image.');
19 $objWriter = Document_Word_Writer_IOFactory::createWriter($PHPWord, 'Word2007');
20 $objWriter->save('Watermark.docx');