PHPWord
PHPWord copied to clipboard
Add read only to some of the paragraphs.
Hello Team, In documentation it is written that Document protection The document (or parts of it) can be password protected. But how to protect some specific text from editing. when I apply
$documentProtection = $phpWord->getSettings()->getDocumentProtection(); $documentProtection->setEditing(DocProtect::READ_ONLY);
It make full document non editable.
Is there any way to make few paragraphs editable and few non editable?
Didnt get any solution over this issue. So I changed the way to create document. I took help of template processor. I create a document which will have one page editable and one page non editable. Then use that document as a template with template processor and changed the required values using set value.
@Userrup Is it possible to do it with Word ?