Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

HtmlRenderOptions

Namespace OfficeIMO.Html
Assembly OfficeIMO.Html
Source revision 804a7612eee4 with working tree changes
Base OfficeImageExportOptions

Shared layout and safety options used by HTML image and PDF rendering.

Inheritance

  • OfficeImageExportOptions
  • HtmlRenderOptions

Usage

Explore 70 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 63

Constructors

public HtmlRenderOptions() #

Creates the default paged print configuration. Select HtmlRenderMode.Continuous for an unpaginated screenshot.

Methods

public virtual HtmlRenderOptions Clone() #
Returns: HtmlRenderOptions

Creates an independent options snapshot.

public HtmlRenderOptions UseBrowserUserAgentStyles() #
Returns: HtmlRenderOptions

Selects the bounded browser user-agent defaults and a generic serif fallback. Authored CSS continues to override these defaults.

public HtmlRenderOptions UseTextHyphenationLexicon(OfficeTextHyphenationLexicon? lexicon) #
Returns: HtmlRenderOptions

Uses or clears a shared immutable hyphenation lexicon for CSS hyphens:auto.

Parameters

lexicon OfficeIMO.Drawing.OfficeTextHyphenationLexicon? requiredposition: 0

Properties

public HtmlRenderMode Mode { get; set; } #

Layout mode. Defaults to paged print output; select Continuous for an unpaginated screenshot.

public HtmlRenderFidelityPolicy FidelityPolicy { get; set; } #

Determines whether diagnosed approximations, omissions, or failures may be returned. Strict rendering rejects every warning or error after collecting the complete diagnostic report.

public Boolean? ProjectSerializedShadowRoots { get; set; } #

Projects Chromium MHTML template shadowmode snapshots into static render content. Null uses the source-format default (enabled for MHTML, disabled for ordinary HTML). This is a diagnosed approximation of shadow DOM composition, not a live shadow tree.

public Double ViewportWidth { get; set; } #

Viewport width for continuous rendering and print-fit media selection, in CSS pixels.

public Double? ViewportHeight { get; set; } #

Optional minimum continuous-surface height, in CSS pixels.

public OfficePageSize PageSize { get; set; } #

Physical page size used by paged rendering.

public Boolean HonorCssPageRules { get; set; } #

When true, generic print @page size and margin declarations override the paged defaults.

public HtmlRenderMargins Margins { get; set; } #

Page or continuous-surface margins measured in CSS pixels.

public String DefaultFontFamily { get; set; } #

Default font family used when CSS does not select one.

public Boolean AllowSystemFontFallback { get; set; } #

Resolves installed faces in system-UI or mathematical fallback lists through the owned font loader. Disable this for a portable render that uses only supplied/document fonts.

public Double DefaultFontSize { get; set; } #

Default CSS font size in pixels.

public Double DefaultLineHeight { get; set; } #

Default line-height multiplier.

public HtmlRenderUserAgentStyleMode UserAgentStyles { get; set; } #

Bounded user-agent style defaults applied before authored CSS. The document profile preserves the existing OfficeIMO layout contract.

public OfficeTextHyphenationCallback? TextHyphenationCallback { get; set; } #

Optional caller-owned dictionary or algorithm that overrides embedded language patterns for CSS hyphens:auto.

public HtmlRenderMediaFeatures MediaFeatures { get; set; } #

Deterministic device and user-preference values exposed to CSS media queries.

public IList<String> AdditionalStylesheets { get; } #

Caller-provided author stylesheets appended after document stylesheets. Each entry participates in the normal bounded cascade and resource policy.

public Uri? BaseUri { get; set; } #

Optional base URI used to resolve links and resource references.

public HtmlUrlPolicy UrlPolicy { get; set; } #

URL policy applied before links or resources enter the rendered result.

public HtmlUrlPolicy? ResourceUrlPolicy { get; set; } #

Optional separate policy for images, stylesheets, fonts, and other render resources. When omitted, HtmlRenderOptions.UrlPolicy is used. This lets package or application resolvers authorize a resource origin without authorizing the same scheme for emitted hyperlinks.

public HtmlRenderResourceResolver? ResourceResolver { get; set; } #

Optional application-supplied asynchronous resolver for policy-approved external resources.

public TimeSpan ResourceTimeout { get; set; } #

Deadline after which one resolver invocation's cancellation token is cancelled.

public Int32 MaxConcurrentResourceLoads { get; set; } #

Maximum asynchronous resolver invocations allowed to run concurrently.

public Int64 MaxResourceBytes { get; set; } #

Maximum bytes accepted from one resolved resource.

public Int64 MaxTotalResourceBytes { get; set; } #

Maximum total bytes accepted from external resources in one render operation.

public Int32 MaxResourceCount { get; set; } #

Maximum number of external resources accepted in one render operation.

public Int32 MaxResourceRequests { get; set; } #

Maximum resolver invocations attempted in one render operation, including misses and failures.

public Int32 MaxStylesheetImportDepth { get; set; } #

Maximum recursive @import depth accepted for external stylesheets.

public Int32 MaxSurfaceWidth { get; set; } #

Maximum width of any generated image surface in output pixels.

public Int32 MaxSurfaceHeight { get; set; } #

Maximum height of any generated image surface in output pixels.

public Int32 MaxPageCount { get; set; } #

Maximum page count accepted from one paged render operation.

public Int32 MaxProjectedVisuals { get; set; } #

Maximum visual nodes materialized while slicing or composing retained surfaces.

public Int32 MaxLayoutDepth { get; set; } #

Maximum element nesting depth processed by the layout engine.

public Int32 MaxInputCharacters { get; set; } #

Maximum UTF-16 characters accepted in the source HTML string. The default leaves enough room for the default total resource budget when resources are embedded as base64 data URIs.

public Int32 MaxHtmlNodes { get; set; } #

Maximum DOM nodes accepted after parsing and before style or layout work begins.

public Int32 MaxBackgroundImageTiles { get; set; } #

Maximum total repeated background-image tiles accepted in one render operation.

public Int32 MaxBackgroundImageLayers { get; set; } #

Maximum background-image layers accepted on one element.

public Int32 MaxBoxShadowLayers { get; set; } #

Maximum CSS box-shadow layers accepted on one element.

public Int32 MaxTextShadowLayers { get; set; } #

Maximum CSS text-shadow layers retained on one element, from 1 to 64.

public Int32 MaxLeaderCharacters { get; set; } #

Maximum characters materialized for a generated CSS leader.

public Int32 MaxSvgForeignObjectDepth { get; set; } #

Maximum nested SVG foreignObject HTML render depth.

public Int32 MaxSvgForeignObjectHtmlNodes { get; set; } #

Maximum DOM nodes accepted by one inline SVG foreignObject HTML viewport.

public Int32 MaxFrameDepth { get; set; } #

Maximum nested iframe srcdoc viewports rendered into one output.

public Int32 MaxGradientStops { get; set; } #

Maximum color stops accepted in one CSS gradient.

public Int32 ConicGradientQualitySegments { get; set; } #

Uniform vector quality segments used when expanding one conic gradient.

public Int32 MaxGridTracks { get; set; } #

Maximum explicit or implicit tracks accepted on either grid axis.

public Int32 MaxColumnCount { get; set; } #

Maximum generated columns accepted in one multi-column formatting context.

public Int32 MaxTableRows { get; set; } #

Maximum rows accepted in one rendered HTML table.

public Int32 MaxTableColumns { get; set; } #

Maximum columns accepted in one rendered HTML table.

public Int32 MaxCollapsedTableBorderSegments { get; set; } #

Maximum candidate edge segments resolved for one collapsed-border table.

public Int32 MaxLayoutOperations { get; set; } #

Maximum element layout operations allowed in one render.

public Int32 MaxRunningStringCharacters { get; set; } #

Maximum normalized UTF-16 characters retained in one CSS running-string value.

public HtmlCssMediaContext MediaContext { get; } #

Gets the CSS media context selected by an explicit render request, or by the legacy continuous/screen and paged/print mapping when no request is active.

public Double PageWidth { get; } #

Gets the paged surface width in CSS pixels.

public Double PageHeight { get; } #

Gets the paged surface height in CSS pixels.

Fields

public const Double CssPixelsPerInch #

CSS reference pixel density used for physical page conversion.

Value: 96