pub struct PageProfile {
pub page: u32,
pub has_text: bool,
pub has_visible_text: bool,
pub image_count: u32,
pub inline_image_count: u32,
pub has_vector_graphics: bool,
pub largest_image_coverage: f64,
}Expand description
What one page paints.
Fields§
§page: u321-based page number.
has_text: boolThe page shows at least one non-empty text string, visible or not (an already recognised scan carries an invisible text layer and counts as having text).
has_visible_text: boolText is shown in a visible render mode.
image_count: u32Image XObjects painted (forms followed), inline images counted separately.
inline_image_count: u32§has_vector_graphics: boolPath painting or shading operators were seen.
largest_image_coverage: f64Largest painted image area as a fraction of the visible page area, capped at 1.0.
Implementations§
Source§impl PageProfile
impl PageProfile
Sourcepub const SCAN_COVERAGE: f64 = 0.5
pub const SCAN_COVERAGE: f64 = 0.5
Minimum PageProfile::largest_image_coverage for a page to count as a scan.
Sourcepub fn is_scanned(&self) -> bool
pub fn is_scanned(&self) -> bool
True when the page has no text layer and an image covers at least half of it: the page needs OCR.
Trait Implementations§
Source§impl Clone for PageProfile
impl Clone for PageProfile
Source§impl Debug for PageProfile
impl Debug for PageProfile
Source§impl PartialEq for PageProfile
impl PartialEq for PageProfile
impl StructuralPartialEq for PageProfile
Auto Trait Implementations§
impl Freeze for PageProfile
impl RefUnwindSafe for PageProfile
impl Send for PageProfile
impl Sync for PageProfile
impl Unpin for PageProfile
impl UnsafeUnpin for PageProfile
impl UnwindSafe for PageProfile
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<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.