status = doc:SetPermission(permission)
doc:SetPermission() sets the permission flags for the document. permission
must be combination of the following flags:
#HPDF_ENABLE_READ:
#HPDF_ENABLE_PRINT:
#HPDF_ENABLE_EDIT_ALL:
#HPDF_ENABLE_COPY:
#HPDF_ENABLE_EDIT:
When doc:SetPermission() succeeds, it returns #HPDF_OK. Otherwise, it returns an error code and the error handler is called.
#HPDF_INVALID_DOCUMENT - An invalid document handle was set.
#HPDF_FAILED_TO_ALLOC_MEM - Memory allocation failed.