Struct pdfium_render::permissions::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
sourceimpl<'a> PdfPermissions<'a>
impl<'a> PdfPermissions<'a>
sourcepub fn bindings(&self) -> &'a dyn PdfiumLibraryBindings
pub fn bindings(&self) -> &'a dyn PdfiumLibraryBindings
Returns the PdfiumLibraryBindings used by this PdfPermissions collection.
sourcepub fn security_handler_revision(
&self
) -> Result<PdfSecurityHandlerRevision, PdfiumError>
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.
sourcepub fn can_print_high_quality(&self) -> Result<bool, PdfiumError>
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.
sourcepub fn can_print_only_low_quality(&self) -> Result<bool, PdfiumError>
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.
sourcepub fn can_assemble_document(&self) -> Result<bool, PdfiumError>
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.
sourcepub fn can_modify_document_content(&self) -> Result<bool, PdfiumError>
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.
sourcepub fn can_extract_text_and_graphics(&self) -> Result<bool, PdfiumError>
pub fn can_extract_text_and_graphics(&self) -> Result<bool, PdfiumError>
Returns true if the containing PdfDocument permits text and graphics to be extracted.
sourcepub fn can_fill_existing_interactive_form_fields(
&self
) -> Result<bool, PdfiumError>
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.
sourcepub fn can_create_new_interactive_form_fields(
&self
) -> Result<bool, PdfiumError>
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.
sourcepub fn can_add_or_modify_text_annotations(&self) -> Result<bool, PdfiumError>
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.