# New-OfficeHtmlRenderOptions

Creates discoverable layout, resource-limit, and rendering settings for HTML image export.

Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

[View on GitHub](https://github.com/EvotecIT/OfficeIMO/tree/master/PowerShell/PSWriteOffice) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteOffice/releases/tag/v3.0.5) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteOffice/0.2.0)

Stars **727**

Forks **84**

Open issues **7**

Total downloads **5,275,783**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-24

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`None`

**Outputs**

`OfficeIMO.Html.HtmlRenderOptions`

**Source**

[NewOfficeHtmlRenderOptionsCommand.cs:18](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Html/NewOfficeHtmlRenderOptionsCommand.cs#L18) 

Creates discoverable layout, resource-limit, and rendering settings for HTML image export.

## Syntax

```
New-OfficeHtmlRenderOptions
[-BackgroundColor <String>]
[-BaseUri <String>]
[-DefaultFontFamily <String>]
[-DefaultFontSize <Double>]
[-DefaultLineHeight <Double>]
[-FidelityPolicy <AllowDiagnosedLoss|RequireNoLoss>]
[-HonorCssPageRules]
[-MaxHtmlNodes <Int32>]
[-MaximumDegreeOfParallelism <Int32>]
[-MaximumOutputCount <Int32>]
[-MaximumOutputHeight <Int32>]
[-MaximumOutputWidth <Int32>]
[-MaximumRasterPixels <Int64>]
[-MaximumTotalEncodedBytes <Int64>]
[-MaximumTotalRasterPixels <Int64>]
[-MaxInputCharacters <Int32>]
[-MaxPageCount <Int32>]
[-MaxTotalResourceBytes <Int64>]
[-Mode <Continuous|Paged>]
[-PageSize <OfficePageSize>]
[-RasterOverflowBehavior <ReduceScale|Throw>]
[-RenderTimeoutSeconds <Double>]
[-ResourceTimeoutSeconds <Double>]
[-Scale <Double>]
[-TargetDpi <Double>]
[-TextShapingLanguage <String>]
[-ViewportHeight <Double>]
[-ViewportWidth <Double>]
[<CommonParameters>]
```

[#](#member-92e0c84ab8a528de785f113f)

Parameter set: `All Parameter Sets`

## Examples

### Render HTML with a bounded viewport and resource budget.

```powershell
$render = New-OfficeHtmlRenderOptions -ViewportWidth 1280 -ViewportHeight 720 -MaxPageCount 10
Export-OfficeHtmlImage -Path .\Report.html -OutputPath .\Report.svg -RenderOptions $render
```

## Parameters

**-BackgroundColor String optional**

Background color name or hex value.

**-BaseUri String optional**

Base URI for relative resources.

**-DefaultFontFamily String optional**

Default font family.

**-DefaultFontSize Double optional**

Default font size.

**-DefaultLineHeight Double optional**

Default line-height multiplier.

**-FidelityPolicy HtmlRenderFidelityPolicy optional**

Fidelity policy for unsupported content.

Possible values: `AllowDiagnosedLoss`, `RequireNoLoss`

**-HonorCssPageRules SwitchParameter optional**

Honor CSS page rules.

**-MaxHtmlNodes Int32 optional**

Maximum HTML nodes.

**-MaximumDegreeOfParallelism Int32 optional**

Maximum independent renders processed concurrently.

**-MaximumOutputCount Int32 optional**

Maximum images accepted from one batch export.

**-MaximumOutputHeight Int32 optional**

Maximum output height in pixels.

**-MaximumOutputWidth Int32 optional**

Maximum output width in pixels.

**-MaximumRasterPixels Int64 optional**

Maximum pixels allocated for one raster image.

**-MaximumTotalEncodedBytes Int64 optional**

Maximum aggregate encoded bytes accepted from one batch.

**-MaximumTotalRasterPixels Int64 optional**

Maximum aggregate raster pixels accepted from one batch.

**-MaxInputCharacters Int32 optional**

Maximum HTML input characters.

**-MaxPageCount Int32 optional**

Maximum rendered page count.

**-MaxTotalResourceBytes Int64 optional**

Maximum resource bytes loaded for the document.

**-Mode HtmlRenderMode optional**

HTML render mode.

Possible values: `Continuous`, `Paged`

**-PageSize OfficePageSize optional**

Page size used by paged rendering.

**-RasterOverflowBehavior OfficeRasterOverflowBehavior optional**

Reduce or reject oversized raster output.

Possible values: `ReduceScale`, `Throw`

**-RenderTimeoutSeconds Double optional**

Maximum seconds allowed for one render.

**-ResourceTimeoutSeconds Double optional**

Maximum duration allowed for one resource load.

**-Scale Double optional**

Output scale multiplier.

**-TargetDpi Double optional**

Target output density in dots per inch.

**-TextShapingLanguage String optional**

BCP 47 language hint for text shaping.

**-ViewportHeight Double optional**

Optional viewport height in CSS pixels.

**-ViewportWidth Double optional**

Viewport width in CSS pixels.

## Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see [about_CommonParameters](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:F5CE1A95C6E894B992A83636CF7E04DD5E07BC16C1246889F8A78D896921EDA5 -->
