PHPWord icon indicating copy to clipboard operation
PHPWord copied to clipboard

Add read only to some of the paragraphs.

Open Userrup opened this issue 6 years ago • 2 comments

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?

Userrup avatar Aug 04 '19 13:08 Userrup

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 avatar Aug 13 '19 11:08 Userrup

@Userrup Is it possible to do it with Word ?

Progi1984 avatar Aug 22 '24 18:08 Progi1984