Struct pdf_writer::writers::ViewerPreferences
source · pub struct ViewerPreferences<'a> { /* private fields */ }
Expand description
Writer for a viewer preference dictionary.
This struct is created by Catalog::viewer_preferences
.
Implementations§
source§impl<'a> ViewerPreferences<'a>
impl<'a> ViewerPreferences<'a>
sourcepub fn hide_toolbar(&mut self, hide: bool) -> &mut Self
pub fn hide_toolbar(&mut self, hide: bool) -> &mut Self
Write the /HideToolbar
attribute to set whether the viewer should hide
its toolbars while the document is open.
Write the /HideMenubar
attribute to set whether the viewer should hide
its menu bar while the document is open.
sourcepub fn fit_window(&mut self, fit: bool) -> &mut Self
pub fn fit_window(&mut self, fit: bool) -> &mut Self
Write the /FitWindow
attribute to set whether the viewer should resize
its window to the size of the first page.
sourcepub fn center_window(&mut self, center: bool) -> &mut Self
pub fn center_window(&mut self, center: bool) -> &mut Self
Write the /CenterWindow
attribute to set whether the viewer should
center its window on the screen.
sourcepub fn non_full_screen_page_mode(&mut self, mode: PageMode) -> &mut Self
pub fn non_full_screen_page_mode(&mut self, mode: PageMode) -> &mut Self
Write the /NonFullScreenPageMode
attribute to set which chrome
elements the viewer should show for a document which requests full
screen rendering in its catalog when it is not shown in full screen
mode.
Panics if mode
is PageMode::FullScreen
.
Methods from Deref<Target = Dict<'a>>§
sourcepub fn insert(&mut self, key: Name<'_>) -> Obj<'_>
pub fn insert(&mut self, key: Name<'_>) -> Obj<'_>
Start writing a pair with an arbitrary value.