# ConvertTo-OfficeVisual

Converts a ChartForgeX visual artifact into a reusable OfficeIMO representation.

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`System.Object`

**Outputs**

`OfficeIMO.ChartForgeX.OfficeVisualConversionResult`

**Source**

[ConvertToOfficeVisualCommand.cs:16](https://github.com/EvotecIT/OfficeIMO/blob/5e5a2dda74b33242f1f075718ee568bb355c03ba/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Visuals/ConvertToOfficeVisualCommand.cs#L16) 

Converts a ChartForgeX visual artifact into a reusable OfficeIMO representation.

## Syntax

```
ConvertTo-OfficeVisual
[-AlternativeText <String>]
[-Height <OfficeLength>]
[-Id <String>]
[-InputObject] <Object>
[-MaximumSvgElements <Int32>]
[-MaximumSvgViewportDimension <Double>]
[-MaximumSvgViewportPixelCount <Int64>]
[-PointsPerPixel <Double>]
[-SvgPolicy <PreserveVector|RasterizeWhenNeeded|RequireVector>]
[-Title <String>]
[-Width <OfficeLength>]
[<CommonParameters>]
```

[#](#method-convertto-officevisual-string-officelength-string-object-int32-double-int64-double-officevisualsvgpolicy-string-officelength)

Parameter set: `Visual`

## Examples

### Prepare one chart for multiple Office outputs.

```powershell
$officeVisual = $artifact | ConvertTo-OfficeVisual -Width 420 -SvgPolicy RasterizeWhenNeeded
```

Creates one fidelity report and placement payload that can be reused in Word, Excel, PowerPoint, and PDF.

## Parameters

**-AlternativeText String optional**

Accessible description for the visual or placed image.

**-Height OfficeLength optional**

Optional output height; numbers mean points and unit suffixes are accepted.

**-Id String optional**

Optional stable identifier for an SVG file input.

**-InputObject Object requiredposition: 0pipeline: True (ByValue)**

ChartForgeX VisualArtifact, OfficeVisualSource, prepared conversion, or portable SVG file path.

**-MaximumSvgElements Int32 optional**

Optional OfficeIMO SVG import element limit.

**-MaximumSvgViewportDimension Double optional**

Optional maximum SVG viewport width or height. Increase the safe default only for trusted input.

**-MaximumSvgViewportPixelCount Int64 optional**

Optional maximum SVG viewport area in pixels. Increase the safe default only for trusted input.

**-PointsPerPixel Double optional**

Conversion factor from ChartForgeX pixels to Office points.

**-SvgPolicy OfficeVisualSvgPolicy optional**

SVG fidelity policy used by OfficeIMO.ChartForgeX.

Possible values: `PreserveVector`, `RasterizeWhenNeeded`, `RequireVector`

**-Title String optional**

Optional title for an SVG file input.

**-Width OfficeLength optional**

Optional output width; numbers mean points and unit suffixes are accepted.

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