ViewerPreferences

ViewerPreferences

Overview

ViewerPreferences is a class in Aspose.PDF FOSS for Python.

The document’s /ViewerPreferences, read and written in place.

This class declares 3 methods for ViewerPreferences objects in Python programs. Available methods include: __init__, __repr__, clear. Public members are accessible to any Python application after installing the Aspose.PDF FOSS for Python package. Properties: center_window, direction, display_doc_title, duplex, fit_window, hide_menubar, and 11 more.

Properties

NameTypeAccessDescription
hide_toolbarboolRead/WriteHide the viewer’s toolbar while the document is open.
hide_menubarboolRead/WriteHide the viewer’s menu bar.
hide_window_uiboolRead/WriteHide everything but the page: no scroll bars, no navigation.
fit_windowboolRead/WriteResize the window to the first page.
center_windowboolRead/WritePut the window in the middle of the screen.
display_doc_titleboolRead/WriteTitle the window with the document’s /Title, not its file name.
non_full_screen_page_modePageModeRead/WriteWhat to show when the document leaves full screen.
directionReadingDirectionRead/WriteWhich way a two-column or two-page layout reads.
view_areaPageBoundaryRead/WriteThe box a page is shown in.
view_clipPageBoundaryRead/WriteThe box a page’s content is clipped to on screen.
print_areaPageBoundaryRead/WriteThe box a page is printed in.
print_clipPageBoundaryRead/WriteThe box a page’s content is clipped to when printed.
print_scalingPrintScalingRead/WriteWhat the print dialogue’s scaling starts on.
duplexDuplexMode | NoneRead/WriteHow to print both sides, or None to leave it to the viewer.
pick_tray_by_pdf_sizebool | NoneRead/WriteChoose the paper tray by page size, or None to leave it alone.
num_copiesint | NoneRead/WriteHow many copies the print dialogue starts on, or None.
print_page_rangetuple[tuple[int, int], ...]Read/WriteThe page ranges the print dialogue starts on, both ends included.

Methods

SignatureDescription
__init__(document: Document)Calls init(document) on this ViewerPreferences instance.
clear()Remove /ViewerPreferences, leaving every entry at its default.
__repr__() → strCalls repr on this ViewerPreferences instance.

See Also