# Export-OfficeHtmlImage

Exports an HTML render surface as PNG or SVG with structured diagnostics.

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

`OfficeIMO.Html.HtmlConversionDocument` `System.String`

**Outputs**

`OfficeIMO.Drawing.OfficeImageExportResult`

**Source**

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

Exports an HTML render surface as PNG or SVG with structured diagnostics.

## Syntax

```
Export-OfficeHtmlImage
[-DocumentOptions <HtmlConversionDocumentOptions>]
[-Format <OfficeImageExportFormat>]
[-OutputPath] <String>
[-PageIndex <Int32>]
[-PassThru]
[-Path] <String>
[-RenderOptions <HtmlRenderOptions>]
[<CommonParameters>]
```

[#](#method-export-officehtmlimage-htmlconversiondocumentoptions-officeimageexportformat-string-int32-switchparameter-string-htmlrenderoptions)

Parameter set: `Path`

```
Export-OfficeHtmlImage
[-DocumentOptions <HtmlConversionDocumentOptions>]
[-Format <OfficeImageExportFormat>]
-Html <String>
[-OutputPath] <String>
[-PageIndex <Int32>]
[-PassThru]
[-RenderOptions <HtmlRenderOptions>]
[<CommonParameters>]
```

[#](#method-export-officehtmlimage-htmlconversiondocumentoptions-officeimageexportformat-string-string-int32-switchparameter-htmlrenderoptions)

Parameter set: `Html`

```
Export-OfficeHtmlImage
-Document <HtmlConversionDocument>
[-DocumentOptions <HtmlConversionDocumentOptions>]
[-Format <OfficeImageExportFormat>]
[-OutputPath] <String>
[-PageIndex <Int32>]
[-PassThru]
[-RenderOptions <HtmlRenderOptions>]
[<CommonParameters>]
```

[#](#method-export-officehtmlimage-htmlconversiondocument-htmlconversiondocumentoptions-officeimageexportformat-string-int32-switchparameter-htmlrenderoptions)

Parameter set: `Document`

## Examples

### Render an HTML file to PNG.

```powershell
Export-OfficeHtmlImage -Path .\Report.html -OutputPath .\Report.png
```

Uses the dependency-free OfficeIMO HTML renderer. Add -PassThru to receive the structured export result.

## Parameters

**-DocumentOptions HtmlConversionDocumentOptions optional**

Optional HTML parsing and trust settings for path or markup input.

**-Format OfficeImageExportFormat optional**

Output image format.

Possible values: `Png`, `Svg`, `Jpeg`, `Tiff`, `Webp`, `Bmp`, `Pbm`, `Tga`, `Icon`

**-OutputPath String requiredposition: 1**

Destination PNG, JPEG, TIFF, SVG, or WebP path.

**-PageIndex Int32 optional**

Zero-based rendered page index.

**-PassThru SwitchParameter optional**

Emit the structured image export result.

**-Path String requiredposition: 0sets: Path**

Path to an HTML file.

**-RenderOptions HtmlRenderOptions optional**

Optional size, pagination, resource, and rendering settings.

**-Html String requiredpipeline: True (ByValue)sets: Html**

HTML markup to render.

**-Document HtmlConversionDocument requiredpipeline: True (ByValue)sets: Document**

Shared HTML conversion document.

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