This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /api/python/settings/format/html-settings.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. HtmlSettings

Settings for Html. Values fall back through three levels: document → SDK → built-in default. Writes target the document only when set on a document’s settings, otherwise the SDK globally when set on SdkSettings.

Tags: Format

from nutrient_sdk import HtmlSettings

Construction

HtmlSettings is accessed through a Document instance for per-document overrides, or via SdkSettings for SDK-wide defaults.

# Per-document override
with Document.open("input.pdf") as doc:
settings = doc.settings.html_settings
settings.some_field = new_value # mutate fields directly
# SDK-wide default (applies to all documents)
SdkSettings.html_settings.some_field = new_value

Settings are configured by writing to fields on the returned object. The settings property itself cannot be reassigned — doc.settings.html_settings = other_settings is rejected.

Properties

image_export

@property
def image_export(self) -> ImageExportMode
@image_export.setter
def image_export(self, value: ImageExportMode) -> None

Controls how images are exported when converting documents to HTML.

Type: ImageExportMode

Default: ImageExportMode.Embedded


layout

@property
def layout(self) -> HtmlLayoutType
@layout.setter
def layout(self, value: HtmlLayoutType) -> None

The layout type to use when saving HTML documents.

Type: HtmlLayoutType

Default: HtmlLayoutType.PageLayout