Initializes a ViewInfoOptions instance for retrieving view information when rendering to HTML.
deffor_html_view(cls):...
Returns: ViewInfoOptions: A new ViewInfoOptions instance.
Example
fromgroupdocs.viewerimportViewerfromgroupdocs.viewer.optionsimportViewInfoOptions# Create view info options for HTML format (single page)options=ViewInfoOptions.for_html_view(True)# Load a document and retrieve view informationwithViewer("sample.xml")asviewer:info=viewer.get_view_info(options)```## for_html_view {#render_single_page}InitializesaViewInfoOptionsinstanceforretrievingviewinformationwhenrenderingtoHTML.```pythondeffor_html_view(cls,render_single_page):...
Parameter
Type
Description
render_single_page
bool
Enables HTML content rendering to a single page.
Returns: ViewInfoOptions: New instance of the ViewInfoOptions class.
Example
fromgroupdocs.viewerimportViewerfromgroupdocs.viewer.optionsimportViewInfoOptions# Retrieve view info for HTML with a single pageoptions=ViewInfoOptions.for_html_view(True)withViewer("sample.xml")asviewer:info=viewer.get_view_info(options)print("Document type:",info.file_type)print("Pages count:",len(info.pages))