API Reference

Cmdlet

Export-OfficeHtmlImage

Namespace PSWriteOffice
Inputs
System.String OfficeIMO.Html.HtmlConversionDocument
Outputs
OfficeIMO.Drawing.OfficeImageExportResult

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

Authored help example

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: Path

Parameters

DocumentOptions HtmlConversionDocumentOptions optionalposition: namedpipeline: False
Optional HTML parsing and trust settings for path or markup input.
Format OfficeImageExportFormat optionalposition: namedpipeline: Falsevalues: 5
Output image format.
Possible values: Png, Svg, Jpeg, Tiff, Webp
OutputPath String requiredposition: 1pipeline: False
Destination PNG or SVG path.
PageIndex Int32 optionalposition: namedpipeline: False
Zero-based rendered page index.
Path String requiredposition: 0pipeline: False
Path to an HTML file.
RenderOptions HtmlRenderOptions optionalposition: namedpipeline: False
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: Html

Parameters

DocumentOptions HtmlConversionDocumentOptions optionalposition: namedpipeline: False
Optional HTML parsing and trust settings for path or markup input.
Format OfficeImageExportFormat optionalposition: namedpipeline: Falsevalues: 5
Output image format.
Possible values: Png, Svg, Jpeg, Tiff, Webp
Html String requiredposition: namedpipeline: True (ByValue)
HTML markup to render.
OutputPath String requiredposition: 1pipeline: False
Destination PNG or SVG path.
PageIndex Int32 optionalposition: namedpipeline: False
Zero-based rendered page index.
RenderOptions HtmlRenderOptions optionalposition: namedpipeline: False
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: Document

Parameters

Document HtmlConversionDocument requiredposition: namedpipeline: True (ByValue)
Shared HTML conversion document.
DocumentOptions HtmlConversionDocumentOptions optionalposition: namedpipeline: False
Optional HTML parsing and trust settings for path or markup input.
Format OfficeImageExportFormat optionalposition: namedpipeline: Falsevalues: 5
Output image format.
Possible values: Png, Svg, Jpeg, Tiff, Webp
OutputPath String requiredposition: 1pipeline: False
Destination PNG or SVG path.
PageIndex Int32 optionalposition: namedpipeline: False
Zero-based rendered page index.
RenderOptions HtmlRenderOptions optionalposition: namedpipeline: False
Optional size, pagination, resource, and rendering settings.

Outputs

OfficeIMO.Drawing.OfficeImageExportResult