Cmdlet
New-OfficeHtmlRenderOptions
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>]#Parameter set:
All Parameter SetsExamples
Render HTML with a bounded viewport and resource budget.
$render = New-OfficeHtmlRenderOptions -ViewportWidth 1280 -ViewportHeight 720 -MaxPageCount 10
Export-OfficeHtmlImage -Path .\Report.html -OutputPath .\Report.svg -RenderOptions $renderParameters
- -BackgroundColor String
- Background color name or hex value.
- -BaseUri String
- Base URI for relative resources.
- -DefaultFontFamily String
- Default font family.
- -DefaultFontSize Double
- Default font size.
- -DefaultLineHeight Double
- Default line-height multiplier.
- -FidelityPolicy HtmlRenderFidelityPolicy
- Fidelity policy for unsupported content.
- Possible values:
AllowDiagnosedLoss,RequireNoLoss - -HonorCssPageRules SwitchParameter
- Honor CSS page rules.
- -MaxHtmlNodes Int32
- Maximum HTML nodes.
- -MaximumDegreeOfParallelism Int32
- Maximum independent renders processed concurrently.
- -MaximumOutputCount Int32
- Maximum images accepted from one batch export.
- -MaximumOutputHeight Int32
- Maximum output height in pixels.
- -MaximumOutputWidth Int32
- Maximum output width in pixels.
- -MaximumRasterPixels Int64
- Maximum pixels allocated for one raster image.
- -MaximumTotalEncodedBytes Int64
- Maximum aggregate encoded bytes accepted from one batch.
- -MaximumTotalRasterPixels Int64
- Maximum aggregate raster pixels accepted from one batch.
- -MaxInputCharacters Int32
- Maximum HTML input characters.
- -MaxPageCount Int32
- Maximum rendered page count.
- -MaxTotalResourceBytes Int64
- Maximum resource bytes loaded for the document.
- -Mode HtmlRenderMode
- HTML render mode.
- Possible values:
Continuous,Paged - -PageSize OfficePageSize
- Page size used by paged rendering.
- -RasterOverflowBehavior OfficeRasterOverflowBehavior
- Reduce or reject oversized raster output.
- Possible values:
ReduceScale,Throw - -RenderTimeoutSeconds Double
- Maximum seconds allowed for one render.
- -ResourceTimeoutSeconds Double
- Maximum duration allowed for one resource load.
- -Scale Double
- Output scale multiplier.
- -TargetDpi Double
- Target output density in dots per inch.
- -TextShapingLanguage String
- BCP 47 language hint for text shaping.
- -ViewportHeight Double
- Optional viewport height in CSS pixels.
- -ViewportWidth Double
- 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.