pub struct ViewerPreferences {Show 14 fields
pub hide_toolbar: bool,
pub hide_menubar: bool,
pub hide_window_ui: bool,
pub fit_window: bool,
pub center_window: bool,
pub display_doc_title: bool,
pub non_full_screen_page_mode: PageMode,
pub direction: ReadingDirection,
pub page_layout: PageLayout,
pub page_mode: PageMode,
pub print_scaling: PrintScaling,
pub duplex: Option<Duplex>,
pub pick_tray_by_pdf_size: Option<bool>,
pub num_copies: Option<u32>,
}Expand description
PDF viewer-preference hints, gathered from the catalog’s
/ViewerPreferences sub-dict plus the catalog-level /PageLayout and
/PageMode.
Every field has a spec-defined default (see ISO 32000-2 §12.2 Table
147, §7.7.2 Table 28); a document with no /ViewerPreferences dict
gets all defaults.
Fields§
§hide_toolbar: bool/HideToolbar — hide viewer toolbar when document is active.
/HideMenubar — hide viewer menu bar.
hide_window_ui: bool/HideWindowUI — hide UI elements like scroll bars.
fit_window: bool/FitWindow — resize the window to fit the first page.
center_window: bool/CenterWindow — center the window on the screen.
display_doc_title: bool/DisplayDocTitle — display the document title in the title bar.
non_full_screen_page_mode: PageMode/NonFullScreenPageMode — /PageMode to use when leaving full-screen.
direction: ReadingDirection/Direction — predominant reading order.
page_layout: PageLayoutCatalog-level /PageLayout.
page_mode: PageModeCatalog-level /PageMode.
print_scaling: PrintScaling/PrintScaling — default print-scaling preference.
duplex: Option<Duplex>/Duplex — default print-duplex preference.
pick_tray_by_pdf_size: Option<bool>/PickTrayByPDFSize — choose paper tray based on PDF page size.
num_copies: Option<u32>/NumCopies — default number of copies to print.
Trait Implementations§
Source§impl Clone for ViewerPreferences
impl Clone for ViewerPreferences
Source§fn clone(&self) -> ViewerPreferences
fn clone(&self) -> ViewerPreferences
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ViewerPreferences
impl Debug for ViewerPreferences
Source§impl Default for ViewerPreferences
impl Default for ViewerPreferences
Source§impl PartialEq for ViewerPreferences
impl PartialEq for ViewerPreferences
impl StructuralPartialEq for ViewerPreferences
Auto Trait Implementations§
impl Freeze for ViewerPreferences
impl RefUnwindSafe for ViewerPreferences
impl Send for ViewerPreferences
impl Sync for ViewerPreferences
impl Unpin for ViewerPreferences
impl UnsafeUnpin for ViewerPreferences
impl UnwindSafe for ViewerPreferences
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
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> ⓘ
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> ⓘ
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