Skip to content

Commit 22e39a3

Browse files
authored
Add API for setting display doc title (#46)
1 parent 9a25d60 commit 22e39a3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/structure.rs

+8
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,14 @@ impl<'a> ViewerPreferences<'a> {
290290
self
291291
}
292292

293+
/// Write the `/DisplayDocTitle` attribute to set whether the viewer should
294+
/// display the document's title from the `Title` entry as the window's title.
295+
/// PDF 1.4+
296+
pub fn display_doc_title(&mut self, display: bool) -> &mut Self {
297+
self.pair(Name(b"DisplayDocTitle"), display);
298+
self
299+
}
300+
293301
/// Write the `/NonFullScreenPageMode` attribute to set which chrome
294302
/// elements the viewer should show for a document which requests full
295303
/// screen rendering in its catalog when it is not shown in full screen

0 commit comments

Comments
 (0)