Skip to content

Commit

Permalink
Add API for setting display doc title (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurenzV authored Oct 30, 2024
1 parent 9a25d60 commit 22e39a3
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 @@ -290,6 +290,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 22e39a3

Please sign in to comment.