pub struct ViewerPrefsRecord {
pub hide_toolbar: Option<bool>,
pub hide_menubar: Option<bool>,
pub hide_window_ui: Option<bool>,
pub fit_window: Option<bool>,
pub center_window: Option<bool>,
pub display_doc_title: Option<bool>,
pub non_full_screen_page_mode: Option<String>,
pub direction: Option<String>,
pub page_layout: Option<String>,
pub page_mode: Option<String>,
}Expand description
One /VIEWERPREFERENCES payload. All keys are optional; later
records override earlier ones key-by-key. The “page layout” and
“page mode” entries technically live on /Catalog directly (not
under /ViewerPreferences) but Adobe pdfmark groups them with the
rest of the viewer-control bag, so stet does too.
Fields§
§hide_toolbar: Option<bool>§hide_window_ui: Option<bool>§fit_window: Option<bool>§center_window: Option<bool>§display_doc_title: Option<bool>§non_full_screen_page_mode: Option<String>/NonFullScreenPageMode — one of UseNone, UseOutlines,
UseThumbs, UseOC. Stored as the raw bytes for forward-
compatibility with values stet doesn’t recognise.
direction: Option<String>/Direction — L2R or R2L.
page_layout: Option<String>Catalog-level /PageLayout: SinglePage, OneColumn,
TwoColumnLeft, TwoColumnRight, TwoPageLeft, TwoPageRight.
page_mode: Option<String>Catalog-level /PageMode: UseNone, UseOutlines,
UseThumbs, FullScreen, UseOC, UseAttachments. Wins over
the UseOutlines default the writer applies when /OUT
records exist.
Implementations§
Source§impl ViewerPrefsRecord
impl ViewerPrefsRecord
Sourcepub fn merge_over(&self, other: &ViewerPrefsRecord) -> ViewerPrefsRecord
pub fn merge_over(&self, other: &ViewerPrefsRecord) -> ViewerPrefsRecord
Merge other into self — self’s Some values win when both
records set the same key. Used to layer multiple
/VIEWERPREFERENCES blocks into one effective record.
Sourcepub fn nested_is_empty(&self) -> bool
pub fn nested_is_empty(&self) -> bool
True when no field has a value — the writer skips the catalog entry entirely in this case.
Trait Implementations§
Source§impl Clone for ViewerPrefsRecord
impl Clone for ViewerPrefsRecord
Source§fn clone(&self) -> ViewerPrefsRecord
fn clone(&self) -> ViewerPrefsRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more