PdfPermissions

Struct PdfPermissions 

Source
pub struct PdfPermissions<'a> { /* private fields */ }
Expand description

The collection of document permissions and security handler settings for a single PdfDocument.

Note that Pdfium currently only offers support for reading the existing permissions of a document. It does not support changing existing permissions or adding new permissions to a document.

Implementations§

Source§

impl<'a> PdfPermissions<'a>

Source

pub fn bindings(&self) -> &'a dyn PdfiumLibraryBindings

Returns the PdfiumLibraryBindings used by this PdfPermissions collection.

Source

pub fn security_handler_revision( &self, ) -> Result<PdfSecurityHandlerRevision, PdfiumError>

Returns the revision of the standard security handler used by the containing PdfDocument. As of PDF version 1.7, possible revision numbers are 2, 3, or 4.

Source

pub fn can_print_high_quality(&self) -> Result<bool, PdfiumError>

Returns true if the containing PdfDocument can be printed to a representation from which a faithful digital copy of the original content could be recovered.

Source

pub fn can_print_only_low_quality(&self) -> Result<bool, PdfiumError>

Returns true if the containing PdfDocument can be only be printed to a low-level representation of the appearance of the document, possibly of degraded quality, from which a faithful digital copy of the original content could not be recovered.

Source

pub fn can_assemble_document(&self) -> Result<bool, PdfiumError>

Returns true if the containing PdfDocument can be assembled; that is, the document can have pages inserted, rotated, or deleted, can have bookmarks created, or can have thumbnail page images created.

Source

pub fn can_modify_document_content(&self) -> Result<bool, PdfiumError>

Returns true if the containing PdfDocument allows general modification of the document contents.

For security handler revisions 3 and later, general document modification can be disabled while still allowing modification of annotations and interactive form fields.

Source

pub fn can_extract_text_and_graphics(&self) -> Result<bool, PdfiumError>

Returns true if the containing PdfDocument permits text and graphics to be extracted.

Source

pub fn can_fill_existing_interactive_form_fields( &self, ) -> Result<bool, PdfiumError>

Returns true if the containing PdfDocument permits any existing form fields, including signature fields, to be filled in by a user.

Source

pub fn can_create_new_interactive_form_fields( &self, ) -> Result<bool, PdfiumError>

Returns true if the containing PdfDocument allows the creation of new form fields, including new signature fields.

Source

pub fn can_add_or_modify_text_annotations(&self) -> Result<bool, PdfiumError>

Returns true if the containing PdfDocument allows the addition or modification of text annotations.

Auto Trait Implementations§

§

impl<'a> Freeze for PdfPermissions<'a>

§

impl<'a> !RefUnwindSafe for PdfPermissions<'a>

§

impl<'a> !Send for PdfPermissions<'a>

§

impl<'a> !Sync for PdfPermissions<'a>

§

impl<'a> Unpin for PdfPermissions<'a>

§

impl<'a> !UnwindSafe for PdfPermissions<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.