pub trait PdfPerm {
// Required methods
fn permissions(&self) -> Permissions;
fn set_permissions(&mut self, permissions: Permissions) -> PdfResult<()>;
}Expand description
Trait for non-encrypted PDF Documents, allowing for easy getting and setting of Permissions.
Required Methods§
Sourcefn permissions(&self) -> Permissions
fn permissions(&self) -> Permissions
Returns the permissions of the PDF document.
Sourcefn set_permissions(&mut self, permissions: Permissions) -> PdfResult<()>
fn set_permissions(&mut self, permissions: Permissions) -> PdfResult<()>
Sets the permissions of the PDF document.
§Note
You must save the document for the permissions to take effect. See Document::save and Document::save_to.
§Errors
Returns Error::AlreadyEncrypted if the document is encrypted, or other variants if operation fails.