Cmdlet
Export-OfficeHtmlImage
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>]#Parameter set:
PathExport-OfficeHtmlImage [-DocumentOptions <HtmlConversionDocumentOptions>] [-Format <OfficeImageExportFormat>] -Html <String> [-OutputPath] <String> [-PageIndex <Int32>] [-PassThru] [-RenderOptions <HtmlRenderOptions>] [<CommonParameters>]#Parameter set:
HtmlExport-OfficeHtmlImage -Document <HtmlConversionDocument> [-DocumentOptions <HtmlConversionDocumentOptions>] [-Format <OfficeImageExportFormat>] [-OutputPath] <String> [-PageIndex <Int32>] [-PassThru] [-RenderOptions <HtmlRenderOptions>] [<CommonParameters>]#Parameter set:
DocumentExamples
Render an HTML file to PNG.
Export-OfficeHtmlImage -Path .\Report.html -OutputPath .\Report.pngUses the dependency-free OfficeIMO HTML renderer. Add -PassThru to receive the structured export result.
Parameters
- -DocumentOptions HtmlConversionDocumentOptions
- Optional HTML parsing and trust settings for path or markup input.
- -Format OfficeImageExportFormat
- Output image format.
- Possible values:
Png,Svg,Jpeg,Tiff,Webp,Bmp,Pbm,Tga,Icon - -OutputPath String
- Destination PNG, JPEG, TIFF, SVG, or WebP path.
- -PageIndex Int32
- Zero-based rendered page index.
- -PassThru SwitchParameter
- Emit the structured image export result.
- -Path String
- Path to an HTML file.
- -RenderOptions HtmlRenderOptions
- Optional size, pagination, resource, and rendering settings.
- -Html String
- HTML markup to render.
- -Document HtmlConversionDocument
- 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.