# ConvertTo-OfficeVisioPng

Exports a Visio document page to native dependency-free PNG.

Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

[View on GitHub](https://github.com/EvotecIT/OfficeIMO/tree/master/PowerShell/PSWriteOffice) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteOffice/releases/tag/v3.0.5) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteOffice/0.2.0)

Stars **725**

Forks **84**

Open issues **3**

Total downloads **5,231,343**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-23

Cmdlet 

Aliases: ConvertTo-VisioPng

**Module**

`PSWriteOffice`

**Aliases**

`ConvertTo-VisioPng`

**Inputs**

`OfficeIMO.Visio.VisioDocument` `System.String`

**Outputs**

`System.Byte[]` `System.IO.FileInfo`

**Source**

[ConvertToOfficeVisioPngCommand.cs:21](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Visio/ConvertToOfficeVisioPngCommand.cs#L21) 

Exports a Visio document page to native dependency-free PNG.

## Syntax

```
ConvertTo-OfficeVisioPng
[-BackgroundColor <String>]
[-FontCollectionIndex <Int32>]
[-FontFaceName <String>]
[-FontFilePath <String>]
[-NoConnectorLabelOverlapResolution]
[-NoConnectorLabels]
[-NoStencilArtwork]
[-NoText]
[-Open]
[-OutputPath <String>]
[-PageIndex <Int32>]
[-Path] <String>
[-PixelsPerInch <Double>]
[-Supersampling <Int32>]
[-Transparent]
[<CommonParameters>]
```

[#](#method-convertto-officevisiopng-string-int32-string-string-switchparameter-switchparameter-switchparameter-switchparameter-switchparameter-string-int32-string-double-int32-switchparameter)

Parameter set: `Path`

```
ConvertTo-OfficeVisioPng
[-BackgroundColor <String>]
-Document <VisioDocument>
[-FontCollectionIndex <Int32>]
[-FontFaceName <String>]
[-FontFilePath <String>]
[-NoConnectorLabelOverlapResolution]
[-NoConnectorLabels]
[-NoStencilArtwork]
[-NoText]
[-Open]
[-OutputPath <String>]
[-PageIndex <Int32>]
[-PixelsPerInch <Double>]
[-Supersampling <Int32>]
[-Transparent]
[<CommonParameters>]
```

[#](#method-convertto-officevisiopng-string-visiodocument-int32-string-string-switchparameter-switchparameter-switchparameter-switchparameter-switchparameter-string-int32-double-int32-switchparameter)

Parameter set: `Document`

## Examples

### Export a diagram preview to PNG.

```powershell
OfficeVisio -Path .\ServiceMap.vsdx { VisioRectangle -Text 'API' -X 2 -Y 4 }
ConvertTo-OfficeVisioPng -Path .\ServiceMap.vsdx -OutputPath .\ServiceMap.png -PixelsPerInch 144
```

Creates a diagram and exports the first page to a PNG preview.

## Parameters

**-BackgroundColor String optional**

Background color name or hex value. Use -Transparent for transparent output.

**-FontCollectionIndex Int32 optional**

Optional zero-based font collection index.

**-FontFaceName String optional**

Optional font face name used when selecting from a font collection.

**-FontFilePath String optional**

Optional TrueType/OpenType font file used for text outlines.

**-NoConnectorLabelOverlapResolution SwitchParameter optional**

Do not resolve connector label overlaps at export time.

**-NoConnectorLabels SwitchParameter optional**

Do not render connector labels.

**-NoStencilArtwork SwitchParameter optional**

Do not render built-in stencil artwork.

**-NoText SwitchParameter optional**

Do not render shape text.

**-Open SwitchParameter optionalaliases: Show**

Open the PNG after saving.

**-OutputPath String optionalaliases: OutPath**

Optional output PNG path.

**-PageIndex Int32 optional**

Zero-based page index to export.

**-Path String requiredposition: 0pipeline: True (ByValue)aliases: FilePathsets: Path**

Visio .vsdx path.

**-PixelsPerInch Double optional**

PNG pixels per Visio inch.

**-Supersampling Int32 optional**

Supersampling factor for smoother raster output.

**-Transparent SwitchParameter optional**

Use transparent PNG background.

**-Document VisioDocument requiredpipeline: True (ByValue)sets: Document**

Visio document object.

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

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:7B737A0D22F741864EE36294E98E661152928F03C0D230F45623E4A0F94DD9DC -->
