How to position an image as a background in the center of my page using php Office / php word?

0

How to position an image as a watermark so that it appears as a background image in the center of my page using the php office / php word library? my code is the following, I can make it appear but at the top of the page but not in the center

   $phpWord = new \PhpOffice\PhpWord\PhpWord();
   $section = $phpWord->addSection();
   $header = $section->addHeader();
   $header->addWatermark('../resources/views/img/aguila2.png', 

    array( 'marginTop'=>-100, 'marginLeft' => 55,
        'width' => 400,
        'height' =>400, 
        'wrappingStyle' => 'behind',
        'positioning' => 'absolute',
        'posHorizontal'    => \PhpOffice\PhpWord\Style\Image::POSITION_HORIZONTAL_RIGHT,
        'posHorizontalRel' => 'margin',
        'posVerticalRel' => 'line',

    ));
    
asked by Julio Mr 27.03.2018 в 02:20
source

0 answers