It has been asked before, years ago, but with no answer corrupt docx when adding image
Hey
I have a template where i replace some variables and generate a docx document... That works fine..
As soon as i add an image, word tells me that the files is corrupt. But letting Word correct the error gives me the document as i expect it to be with the image.
Im adding image like this...
$docx->addBreak(array('type' => 'page'));
$options = array(
'src' => $value['110333870356bc784cf1b6b0.56722572.png'],
'imageAlign' => 'center',
'scaling' => 100,
'spacingTop' => 10,
'spacingBottom' => 0,
'spacingLeft' => 0,
'spacingRight' => 20,
'textWrap' => 0,
);
$docx->addImage($options);
Im lost here .. ? ..