Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

ConvertTo-OfficeVisioPng

Aliases: ConvertTo-VisioPng
Module PSWriteOffice
Aliases
ConvertTo-VisioPng
Inputs
OfficeIMO.Visio.VisioDocument System.String
Outputs
System.Byte[] System.IO.FileInfo

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>]
#
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>]
#
Parameter set: Document

Examples

Authored help example

Export a diagram preview to PNG.

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.