Error Message: Failed to set document rights. Error code: 2. There are two reasons why this error message may occur: A document open password has been set on the document. This must be removed before you can protect a PDF document. The source file you are trying to protect is not an Adobe compliant PDF file.