Skip to content

Commit

Permalink
Add API for setting display doc title
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurenzV committed Oct 28, 2024
1 parent 46afbac commit 3d65a96
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/structure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,14 @@ impl<'a> ViewerPreferences<'a> {
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+
pub fn display_doc_title(&mut self, display: bool) -> &mut Self {
self.pair(Name(b"DisplayDocTitle"), display);
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
Expand Down

0 comments on commit 3d65a96

Please sign in to comment.