pub struct ParseOptions {
pub error_mode: ErrorMode,
pub extract_mode: ExtractMode,
pub memory_limit_mb: u32,
pub extract_resources: bool,
pub parallel: bool,
pub pages: PageSelection,
pub password: Option<String>,
}Expand description
Options for parsing PDF documents.
Fields§
§error_mode: ErrorModeError handling mode
extract_mode: ExtractModeWhat to extract from the document
memory_limit_mb: u32Memory limit in MB (0 = unlimited)
extract_resources: boolWhether to extract embedded resources (images, fonts)
parallel: boolWhether to use parallel processing
pages: PageSelectionPage selection (which pages to parse)
password: Option<String>Password for encrypted documents
Implementations§
Source§impl ParseOptions
impl ParseOptions
Sourcepub fn with_error_mode(self, mode: ErrorMode) -> Self
pub fn with_error_mode(self, mode: ErrorMode) -> Self
Set error mode.
Sourcepub fn with_extract_mode(self, mode: ExtractMode) -> Self
pub fn with_extract_mode(self, mode: ExtractMode) -> Self
Set extract mode.
Sourcepub fn with_memory_limit(self, mb: u32) -> Self
pub fn with_memory_limit(self, mb: u32) -> Self
Set memory limit in MB.
Sourcepub fn with_resources(self, extract: bool) -> Self
pub fn with_resources(self, extract: bool) -> Self
Enable or disable resource extraction.
Sourcepub fn with_parallel(self, parallel: bool) -> Self
pub fn with_parallel(self, parallel: bool) -> Self
Enable or disable parallel processing.
Sourcepub fn sequential(self) -> Self
pub fn sequential(self) -> Self
Disable parallel processing.
Sourcepub fn with_pages(self, pages: PageSelection) -> Self
pub fn with_pages(self, pages: PageSelection) -> Self
Set page selection.
Sourcepub fn with_password(self, password: impl Into<String>) -> Self
pub fn with_password(self, password: impl Into<String>) -> Self
Set password for encrypted documents.
Trait Implementations§
Source§impl Clone for ParseOptions
impl Clone for ParseOptions
Source§fn clone(&self) -> ParseOptions
fn clone(&self) -> ParseOptions
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 ParseOptions
impl Debug for ParseOptions
Auto Trait Implementations§
impl Freeze for ParseOptions
impl RefUnwindSafe for ParseOptions
impl Send for ParseOptions
impl Sync for ParseOptions
impl Unpin for ParseOptions
impl UnwindSafe for ParseOptions
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 more