ViewInfo class

ViewInfo class

Represents view information for a generic document.

The ViewInfo type exposes the following members:

Constructors

Constructor Description
init Initializes a new instance of ViewInfo.
init Initializes a new ViewInfo instance.

Methods

Method Description
to_string Returns a string that represents the current object.

Properties

Property Description
file_type The type of the file.
pages The list of pages to view.

Example

from groupdocs.viewer import Viewer
from groupdocs.viewer.options import ViewInfoOptions

with Viewer("sample.docx") as viewer:
    options = ViewInfoOptions.for_html_view()
    view_info = viewer.get_view_info(options)
    for page in view_info.pages:
        print(f"Page {page.number}: {page.name}")

See Also