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 ViewerPreferences<'_>
impl ViewerPreferences<'_>
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 display_doc_title(&mut self, display: bool) -> &mut Self
pub fn display_doc_title(&mut self, display: bool) -> &mut Self
Write the /DisplayDocTitle
attribute to set whether the viewer should
display the document’s title from the Title
entry as the window’s title.
PDF 1.4+
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.
Sourcepub fn pair<T: Primitive>(&mut self, key: Name<'_>, value: T) -> &mut Self
pub fn pair<T: Primitive>(&mut self, key: Name<'_>, value: T) -> &mut Self
Write a pair with a primitive value.
This is a shorthand for dict.insert(key).primitive(value)
.
Sourcepub fn pairs<'n, T: Primitive>(
&mut self,
pairs: impl IntoIterator<Item = (Name<'n>, T)>,
) -> &mut Self
pub fn pairs<'n, T: Primitive>( &mut self, pairs: impl IntoIterator<Item = (Name<'n>, T)>, ) -> &mut Self
Write a sequence of pairs with primitive values.