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> !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 Twhere
T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.