HtmlViewOptions class
Leave feedback
On this page
The options for rendering documents into HTML format.
The HtmlViewOptions type exposes the following members:
| Method | Description |
|---|---|
| for_embedded_resources | Initializes an HtmlViewOptions instance for rendering HTML with embedded resources. |
| for_embedded_resources | Initializes an instance of the HtmlViewOptions class for rendering into HTML with embedded resources. |
| for_embedded_resources | Initializes an HtmlViewOptions instance for rendering into HTML with embedded resources. |
| for_embedded_resources | Initializes an instance of the HtmlViewOptions class with embedded resources. |
| for_embedded_resources | Initializes an HtmlViewOptions instance for embedded resources. |
| for_embedded_resources_create_page_stream | |
| for_embedded_resources_file | |
| for_embedded_resources_ipage_stream_factory | |
| for_embedded_resources_string | |
| for_external_resources | Initializes an instance of the HtmlViewOptions class for rendering into HTML with external resources. |
| for_external_resources | Initializes an instance of the HtmlViewOptions class for rendering into HTML with external resources. |
| for_external_resources | Initializes an HtmlViewOptions instance for rendering into HTML with external resources. |
| for_external_resources | Initializes an HtmlViewOptions instance configured to generate HTML files with external resources. |
| for_external_resources | Initializes an instance of the HtmlViewOptions class. |
| for_external_resources_create_page_stream | |
| for_external_resources_file | |
| for_external_resources_ipage_stream_factory | |
| for_external_resources_string | |
| rotate_page | Applies the clockwise rotation to a page. (inherited from ViewOptions) |
| rotate_page_int32 | (inherited from ViewOptions) |
| Property | Description |
|---|---|
| exclude_fonts | The property disables adding any fonts into the HTML document. |
| fonts_to_exclude | The list of font names to exclude from HTML document. |
| for_printing | The property enables optimization of the output HTML for printing. |
| image_height | The height of an output image (in pixels). This property is available when converting a single image to HTML only. |
| image_max_height | The maximum height of an output image in pixels. This property is available when converting a single image to HTML only. |
| image_max_width | The max width of an output image (in pixels). This property is available only when converting a single image to HTML. |
| image_width | The width of the output image (in pixels). |
| minify | The property enables HTML content and HTML resources minification. |
| remove_java_script | The property determines whether JavaScript source code is removed from links in the generated HTML documents when rendering input documents that contain scripts. Enabled by default (True). |
| render_responsive | The property enables responsive rendering. |
| render_to_single_page | The property enables rendering an entire document to a single HTML file. |
| archive_options | The archive files view options. (inherited from BaseViewOptions) |
| cad_options | The CAD drawing view options. (inherited from BaseViewOptions) |
| default_font_name | The default font for a document used during rendering when a required font is missing. (inherited from BaseViewOptions) |
| email_options | The email messages view options. (inherited from BaseViewOptions) |
| mail_storage_options | The mail storage data files view options. (inherited from BaseViewOptions) |
| outlook_options | The Microsoft Outlook data files view options. (inherited from BaseViewOptions) |
| page_rotations | The page rotation. (inherited from ViewOptions) |
| pdf_options | The PDF document view options. (inherited from BaseViewOptions) |
| presentation_options | The presentation files view options. (inherited from BaseViewOptions) |
| project_management_options | The project management files view options. (inherited from BaseViewOptions) |
| remove_comments | The property disables rendering comments when set to True. By default it is False, so all comments are displayed. (inherited from BaseViewOptions) |
| render_comments | The property enables or disables rendering comments. (inherited from BaseViewOptions) |
| render_hidden_pages | The property enables rendering of hidden pages. (inherited from BaseViewOptions) |
| render_notes | The property enables rendering notes and annotations for some formats. (inherited from BaseViewOptions) |
| spreadsheet_options | The spreadsheet files view options. (inherited from BaseViewOptions) |
| text_options | The text options for rendering text files. (inherited from BaseViewOptions) |
| visio_rendering_options | The Visio files view options. (inherited from BaseViewOptions) |
| watermark | The text watermark to be applied to each page. (inherited from ViewOptions) |
| web_document_options | The Web files view options. (inherited from BaseViewOptions) |
| word_processing_options | The Word processing files view options. (inherited from BaseViewOptions) |
from groupdocs.viewer import Viewer
from groupdocs.viewer.options import HtmlViewOptions
with Viewer("document.docx") as viewer:
options = HtmlViewOptions.for_embedded_resources("page_{0}.html")
viewer.view(options)
Task guides that use HtmlViewOptions:
- Quick Start Guide
- Load document from local disk
- Load document from stream
- Load document from URL
- Add text watermarks
- module
groupdocs.viewer.options
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.