# New-OfficeHtmlRenderOptions

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

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`None`

**Outputs**

`OfficeIMO.Html.HtmlRenderOptions`

**Source**

[NewOfficeHtmlRenderOptionsCommand.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Html/NewOfficeHtmlRenderOptionsCommand.cs#L19) 

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

## Syntax

```
New-OfficeHtmlRenderOptions
[-BaseUri <String>]
[-DefaultFont <String>]
[-DefaultLineHeight <Double>]
[-DefaultSize <OfficeLength>]
[-FidelityPolicy <AllowDiagnosedLoss|FailOnLoss>]
[-MaxHtmlNodes <Int32>]
[-MaximumDegreeOfParallelism <Int32>]
[-MaximumOutputCount <Int32>]
[-MaximumOutputHeight <Int32>]
[-MaximumOutputWidth <Int32>]
[-MaximumRasterPixelCount <Int64>]
[-MaximumTotalEncodedBytes <Int64>]
[-MaximumTotalRasterPixelCount <Int64>]
[-MaxInputCharacters <Int32>]
[-MaxPageCount <Int32>]
[-MaxTotalResourceBytes <Int64>]
[-Mode <Continuous|Paged>]
[-NoCssPageRules]
[-PageSize <OfficePageSize>]
[-RasterOverflowBehavior <ReduceScale|Throw>]
[-RenderTimeoutSeconds <Double>]
[-ResourceTimeoutSeconds <Double>]
[-TextShapingLanguage <String>]
[-ViewportHeight <OfficeLength>]
[-ViewportWidth <OfficeLength>]
[<CommonParameters>]
```

[#](#member-ebd18e61c5564e63e47f5f31)

Parameter set: `Default`

## Guides & Samples

Authored walkthroughs and practical samples linked to this command.

- [Render HTML to Images and Convert to Word, Markdown and RTF](/docs/html/render-and-convert/) Guide
  
  Render HTML to PNG, JPEG, WebP, TIFF or SVG screenshots and page images, and convert HTML into editable Word, Markdown or RTF documents.

## 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

**-BaseUri String optional**

Base URI for relative resources.

**-DefaultFont String optional**

Default font family.

**-DefaultLineHeight Double optional**

Default line-height multiplier.

**-DefaultSize OfficeLength optional**

Default font size.

**-FidelityPolicy HtmlRenderFidelityPolicy optional**

Fidelity policy for unsupported content.

Possible values: `AllowDiagnosedLoss`, `FailOnLoss`

**-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.

**-MaximumRasterPixelCount Int64 optional**

Maximum pixels allocated for one raster image.

**-MaximumTotalEncodedBytes Int64 optional**

Maximum aggregate encoded bytes accepted from one batch.

**-MaximumTotalRasterPixelCount 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`

**-NoCssPageRules SwitchParameter optional**

Honor CSS page rules.

**-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.

**-TextShapingLanguage String optional**

BCP 47 language hint for text shaping.

**-ViewportHeight OfficeLength optional**

Optional viewport height in CSS pixels.

**-ViewportWidth OfficeLength 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).

<!-- PowerForge markdown artifact sha256:821CEB992E5285621D77801C215FD8418B958462131BE391DBBB4E05A431F702 -->
