ViewInfo

public interface ViewInfo

Represents view information for a generic document.

The ViewInfo interface defines the contract for accessing and manipulating view information for a generic document in the GroupDocs.Viewer component. It provides methods to retrieve information such as the file type, pages, and other properties.

Example usage:


 try (Viewer viewer = new Viewer("document.mpp")) {
     final ViewInfo viewInfo = viewer.getViewInfo(ViewInfoOptions.forPngView());
     if (viewInfo instanceof ProjectManagementViewInfo) {
         ProjectManagementViewInfo projectManagementViewInfo = (ProjectManagementViewInfo) viewInfo;
         // Use the projectManagementViewInfo object for further operations
     }
     // ...
 }
 

Note: The default implementation of this interface is ViewInfoImpl.

Methods

Method Description
getFileType() Retrieves the type of the file.
setFileType(FileType fileType) Sets the file type.
getPages() Retrieves the list of pages to view.
setPages(List pages) Sets the list of pages.

getFileType()

public abstract FileType getFileType()

Retrieves the type of the file.

Returns: FileType - the file type.

setFileType(FileType fileType)

public abstract void setFileType(FileType fileType)

Sets the file type.

Parameters:

Parameter Type Description
fileType FileType The file type to set.

getPages()

public abstract List<Page> getPages()

Retrieves the list of pages to view.

Returns: java.util.List<com.groupdocs.viewer.results.Page> - the list of pages.

setPages(List pages)

public abstract void setPages(List<Page> pages)

Sets the list of pages.

Parameters:

Parameter Type Description
pages java.util.List<com.groupdocs.viewer.results.Page> The list of pages to set.