API Reference
Cmdlet
Export-OfficeHtmlImage
Exports an HTML render surface as PNG or SVG with structured diagnostics.
Remarks
Exports an HTML render surface as PNG or SVG with structured diagnostics.
Examples
Render an HTML file to PNG.
PS>
Export-OfficeHtmlImage -Path .\Report.html -OutputPath .\Report.png
Uses the dependency-free OfficeIMO HTML renderer and returns OfficeImageExportResult.
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.
Syntax
Export-OfficeHtmlImage [-DocumentOptions <HtmlConversionDocumentOptions>] [-Format <Png|Svg|Jpeg|Tiff|Webp>] -OutputPath <String> [-PageIndex <Int32>] -Path <String> [-RenderOptions <HtmlRenderOptions>] [<CommonParameters>]#Parameter set:
PathParameters
- 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 - OutputPath String
- Destination PNG or SVG path.
- PageIndex Int32
- Zero-based rendered page index.
- Path String
- Path to an HTML file.
- RenderOptions HtmlRenderOptions
- Optional size, pagination, resource, and rendering settings.
Outputs
OfficeIMO.Drawing.OfficeImageExportResult
Export-OfficeHtmlImage [-DocumentOptions <HtmlConversionDocumentOptions>] [-Format <Png|Svg|Jpeg|Tiff|Webp>] -Html <String> -OutputPath <String> [-PageIndex <Int32>] [-RenderOptions <HtmlRenderOptions>] [<CommonParameters>]#Parameter set:
HtmlParameters
- 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 - Html String
- HTML markup to render.
- OutputPath String
- Destination PNG or SVG path.
- PageIndex Int32
- Zero-based rendered page index.
- RenderOptions HtmlRenderOptions
- Optional size, pagination, resource, and rendering settings.
Outputs
OfficeIMO.Drawing.OfficeImageExportResult
Export-OfficeHtmlImage -Document <HtmlConversionDocument> [-DocumentOptions <HtmlConversionDocumentOptions>] [-Format <Png|Svg|Jpeg|Tiff|Webp>] -OutputPath <String> [-PageIndex <Int32>] [-RenderOptions <HtmlRenderOptions>] [<CommonParameters>]#Parameter set:
DocumentParameters
- Document HtmlConversionDocument
- Shared HTML conversion document.
- 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 - OutputPath String
- Destination PNG or SVG path.
- PageIndex Int32
- Zero-based rendered page index.
- RenderOptions HtmlRenderOptions
- Optional size, pagination, resource, and rendering settings.
Outputs
OfficeIMO.Drawing.OfficeImageExportResult