ArchiveViewInfo class

ArchiveViewInfo class

Represents view information for an archive file.

The ArchiveViewInfo type exposes the following members:

Constructors

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

Methods

Method Description
to_string Returns a string that represents the current object. (inherited from ViewInfo)

Properties

Property Description
folders The folders contained by the archive file.
file_type The type of the file. (inherited from ViewInfo)
pages The list of pages to view. (inherited from ViewInfo)

Example

from typing import cast
from groupdocs.viewer import Viewer
from groupdocs.viewer.options import ViewInfoOptions
from groupdocs.viewer.results import ArchiveViewInfo

def get_archive_info():
    with Viewer("documents.zip") as viewer:
        info = viewer.get_view_info(ViewInfoOptions.for_html_view())
        archive_info = cast(ArchiveViewInfo, info)

        print("File type:", archive_info.file_type)
        print("Pages count:", len(archive_info.pages))
        print("Folders:")
        for folder in archive_info.folders:
            print(f"  {folder}")

if __name__ == "__main__":
    get_archive_info()

Guides

Task guides that use ArchiveViewInfo:

See Also