This project is read-only.
1
Vote

after save i have a corrupted file

description

here is my code :
    $phpWord = new \PhpOffice\PhpWord\PhpWord();
    $phpWord->getCompatibility()->setOoxmlVersion(15);

    $phpWord->setDefaultFontSize(10);
    $sectionRun = $phpWord->addSection(array('marginLeft'=>"900",'marginRight'=>"900"));
   $section= $sectionRun->addTextRun();
    $filename = "Arrete-Renouvellement.docx";

    $objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'Word2007');
    $objWriter->save($webPath . '/courrier/renouvellement/'.$filename);
when I open the saved file it 's corrupted, i'm on symfony2

I dont know what is the problem can you help me

thank you

my file on the attachment

file attachments

comments