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
| Name | Type | Access | Description |
|---|---|---|---|
hide_toolbar | bool | Read/Write | Hide the viewer’s toolbar while the document is open. |
hide_menubar | bool | Read/Write | Hide the viewer’s menu bar. |
hide_window_ui | bool | Read/Write | Hide everything but the page: no scroll bars, no navigation. |
fit_window | bool | Read/Write | Resize the window to the first page. |
center_window | bool | Read/Write | Put the window in the middle of the screen. |
display_doc_title | bool | Read/Write | Title the window with the document’s /Title, not its file name. |
non_full_screen_page_mode | PageMode | Read/Write | What to show when the document leaves full screen. |
direction | ReadingDirection | Read/Write | Which way a two-column or two-page layout reads. |
view_area | PageBoundary | Read/Write | The box a page is shown in. |
view_clip | PageBoundary | Read/Write | The box a page’s content is clipped to on screen. |
print_area | PageBoundary | Read/Write | The box a page is printed in. |
print_clip | PageBoundary | Read/Write | The box a page’s content is clipped to when printed. |
print_scaling | PrintScaling | Read/Write | What the print dialogue’s scaling starts on. |
duplex | DuplexMode | None | Read/Write | How to print both sides, or None to leave it to the viewer. |
pick_tray_by_pdf_size | bool | None | Read/Write | Choose the paper tray by page size, or None to leave it alone. |
num_copies | int | None | Read/Write | How many copies the print dialogue starts on, or None. |
print_page_range | tuple[tuple[int, int], ...] | Read/Write | The page ranges the print dialogue starts on, both ends included. |
Methods
| Signature | Description |
|---|---|
__init__(document: Document) | Calls init(document) on this ViewerPreferences instance. |
clear() | Remove /ViewerPreferences, leaving every entry at its default. |
__repr__() → str | Calls repr on this ViewerPreferences instance. |