Sujan - 2020-12-20 13:07:18
Hi,
The package is great and renders everything perfectly.
Maybe this is an additional feature request but I was trying to add password to the generated docx (using this class) by loading it into another package(phpOffice) and then adding a password and then rewriting the original document again. It doesnt work.
// $fileName = "merges/test.docx";
// $phpWord = PhpOffice\PhpWord\IOFactory::load($fileName);
// $documentProtection = $phpWord->getSettings()->getDocumentProtection();
// $documentProtection->setEditing(DocProtect::READ_ONLY);
// $documentProtection->setPassword('myPassword');
// $documentProtection->saveAs("merges/test.docx");
The styling and the variable merge tags are all a mess. Trying to do this for days now.
Maybe this class can have a password protect function for setting password to the generated docx using variables?
Please help.
Thank you,
#