pub struct PdfPermissions {
pub allow_print: bool,
pub allow_modify: bool,
pub allow_copy: bool,
pub allow_annotations: bool,
pub allow_fill_forms: bool,
pub allow_accessibility: bool,
pub allow_assemble: bool,
pub allow_print_high_quality: bool,
}Expand description
PDF permission flags per PDF spec Table 3.20
These flags control what operations are allowed when the document is opened with the user password.
Fields§
§allow_print: boolAllow printing (bit 3)
allow_modify: boolAllow modifying content (bit 4)
allow_copy: boolAllow copying/extracting text (bit 5)
allow_annotations: boolAllow adding/modifying annotations (bit 6)
allow_fill_forms: boolAllow filling form fields (bit 9) — always true for rev 3+
allow_accessibility: boolAllow extracting for accessibility (bit 10)
allow_assemble: boolAllow assembling document (bit 11)
allow_print_high_quality: boolAllow high-quality printing (bit 12)
Implementations§
Source§impl PdfPermissions
impl PdfPermissions
Sourcepub fn to_p_value(&self) -> i32
pub fn to_p_value(&self) -> i32
Convert permissions to the 32-bit integer used in the /P entry
Per PDF spec, bits 1-2 must be 0, bits 7-8 are reserved (1), bits 13-32 are reserved (1 for rev 3+).
Trait Implementations§
Source§impl Clone for PdfPermissions
impl Clone for PdfPermissions
Source§fn clone(&self) -> PdfPermissions
fn clone(&self) -> PdfPermissions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PdfPermissions
impl Debug for PdfPermissions
Source§impl Default for PdfPermissions
impl Default for PdfPermissions
impl Copy for PdfPermissions
Auto Trait Implementations§
impl Freeze for PdfPermissions
impl RefUnwindSafe for PdfPermissions
impl Send for PdfPermissions
impl Sync for PdfPermissions
impl Unpin for PdfPermissions
impl UnsafeUnpin for PdfPermissions
impl UnwindSafe for PdfPermissions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().