pdftools_toolbox.pdf.navigation.viewer_settings

Classes

ViewerSettings(handle)

class pdftools_toolbox.pdf.navigation.viewer_settings.ViewerSettings(handle)[source]

Bases: _NativeObject

static copy(target_document: Document, viewer_settings: ViewerSettings) ViewerSettings[source]

Copy viewer settings

The newly created viewer settings are associated with the target document, but not yet used as the document’s viewer settings.

Parameters:
Returns:

a viewer settings object with the same content, but associated with the current document.

Return type:

pdftools_toolbox.pdf.navigation.viewer_settings.ViewerSettings

Raises:
  • pdftools_toolbox.conformance_error.ConformanceError – The conformance level of the source document is not compatible with the conformance level of the target document.

  • ValueError – if the targetDocument argument has already been closed

  • ValueError – if the targetDocument argument is read-only

  • ValueError – if the viewerSettings argument is not associated with an input document

  • ValueError – if the document associated with the viewerSettings object has already been closed

  • OSError – Error reading from the stream

property page_display: PageDisplay | None

The positional arrangment for displaying pages when opening the document in a viewer. If None then the viewer acts according to it’s default behavior.

Returns:

Optional[pdftools_toolbox.pdf.navigation.page_display.PageDisplay]

Raises:

StateError – if the document has already been closed

property active_pane: ViewerNavigationPane | None

The initially visible side pane when opening the document in a viewer. If None then the viewer acts according to it’s default behavior.

Returns:

Optional[pdftools_toolbox.pdf.navigation.viewer_navigation_pane.ViewerNavigationPane]

Raises:

StateError – if the document has already been closed

property full_screen: bool

If True then opening the document will make the viewer try to enter full screen mode.

Returns:

bool

Raises:

StateError – if the document has already been closed

property hide_toolbar: bool

If True then opening the document will instruct the viewer to hide it’s toolbar.

Returns:

bool

Raises:

StateError – if the document has already been closed

property hide_menubar: bool

If True then opening the document will instruct the viewer to hide it’s menu bar.

Returns:

bool

Raises:

StateError – if the document has already been closed

property display_document_title: bool

If True then opening the document will instruct the viewer to display the document’s title from the metadata instead of it’s file name.

Returns:

bool

Raises:

StateError – if the document has already been closed