# New-OfficeHtmlConversionOptions

Creates discoverable parsing, trust, and document settings for HTML conversion.

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`None`

**Outputs**

`OfficeIMO.Html.HtmlConversionDocumentOptions`

**Source**

[NewOfficeHtmlConversionOptionsCommand.cs:15](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Html/NewOfficeHtmlConversionOptionsCommand.cs#L15) 

Creates discoverable parsing, trust, and document settings for HTML conversion.

## Syntax

```
New-OfficeHtmlConversionOptions
[-BaseUri <String>]
[-NoBodyContentsOnly]
[-NoNormalizedHtml]
[-Profile <Semantic|Document|HighFidelityPrint|PositionedReview>]
[-Trust <Untrusted|Trusted>]
[<CommonParameters>]
```

[#](#method-new-officehtmlconversionoptions-string-switchparameter-switchparameter-htmlconversionprofile-htmlinputtrust)

Parameter set: `Default`

## Guides & Samples

Authored walkthroughs and practical samples linked to this command.

- [HTML and MHTML in .NET](/docs/html/) Guide
  
  Parse HTML and MHTML safely in .NET and turn web content into PDF, images, Word, Markdown or RTF with one HTML engine, PSWriteOffice and the CLI.

## Examples

### Resolve relative resources from a trusted report directory.

```powershell
$document = New-OfficeHtmlConversionOptions -BaseUri (Resolve-Path .\Assets) -NoBodyContentsOnly
Export-OfficeHtmlImage -Path .\Report.html -OutputPath .\Report.svg -DocumentOptions $document
```

## Parameters

**-BaseUri String optional**

Base URI used to resolve relative references.

**-NoBodyContentsOnly SwitchParameter optional**

Convert only body contents.

**-NoNormalizedHtml SwitchParameter optional**

Retain normalized HTML in the conversion document.

**-Profile HtmlConversionProfile optional**

Built-in conversion profile.

Possible values: `Semantic`, `Document`, `HighFidelityPrint`, `PositionedReview`

**-Trust HtmlInputTrust optional**

Input trust level.

Possible values: `Untrusted`, `Trusted`

## 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).

<!-- PowerForge markdown artifact sha256:2CF7F3E83FCEB15E1253AABDE3B11B8EE94C3AD0CA577F4ACA39D9F4B99F622E -->
