code: func (f *Fpdf) SetProtection(actionFlag byte, userPassStr, ownerPassStr string) {
  	if f.err != nil {
  		return
  	}
  	f.protect.setProtection(actionFlag, userPassStr, ownerPassStr)
  }
docs: // SetProtection applies certain constraints on the finished PDF document.
  //
  // actionFlag is a bitflag that controls various document operations.
  // CnProtectPrint allows the document to be printed. CnProtectModify allows a
  // document to be modified by a PDF editor. CnProtectCopy allows text and
  // images to be copied into the system clipboard. CnProtectAnnotForms allows
  // annotations and forms to be added by a PDF editor. These values can be
  // combined by or-ing them together, for example,
  // CnProtectCopy|CnProtectModify. This flag is advisory; not all PDF readers
  // implement the constraints that this argument attempts to control.
  //
  // userPassStr specifies the password that will need to be provided to view the
  // contents of the PDF. The permissions specified by actionFlag will apply.
  //
  // ownerPassStr specifies the password that will need to be provided to gain
  // full access to the document regardless of the actionFlag value. An empty
  // string for this argument will be replaced with a random value, effectively
  // prohibiting full access to the document.