API Reference
Cmdlet
ConvertTo-OfficeVisioPng
Exports a Visio document page to native dependency-free PNG.
Remarks
Exports a Visio document page to native dependency-free PNG.
Examples
Export a diagram preview to PNG.
PS>
New-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.
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
ConvertTo-OfficeVisioPng [-BackgroundColor <String>] [-FontCollectionIndex <Nullable`1>] [-FontFaceName <String>] [-FontFilePath <String>] [-NoConnectorLabelOverlapResolution] [-NoConnectorLabels] [-NoStencilArtwork] [-NoText] [-OutputPath <String>] [-PageIndex <Int32>] -Path <String> [-PixelsPerInch <Nullable`1>] [-Show] [-Supersampling <Nullable`1>] [-Transparent] [<CommonParameters>]#Parameter set:
PathParameters
- BackgroundColor String
- Background color name or hex value. Use -Transparent for transparent output.
- FontCollectionIndex Nullable`1
- Optional zero-based font collection index.
- FontFaceName String
- Optional font face name used when selecting from a font collection.
- FontFilePath String
- Optional TrueType/OpenType font file used for text outlines.
- NoConnectorLabelOverlapResolution SwitchParameter
- Do not resolve connector label overlaps at export time.
- NoConnectorLabels SwitchParameter
- Do not render connector labels.
- NoStencilArtwork SwitchParameter
- Do not render built-in stencil artwork.
- NoText SwitchParameter
- Do not render shape text.
- OutputPath String
- Optional output PNG path.
- PageIndex Int32
- Zero-based page index to export.
- Path String
- Visio .vsdx path.
- PixelsPerInch Nullable`1
- PNG pixels per Visio inch.
- Show SwitchParameter
- Open the PNG after saving.
- Supersampling Nullable`1
- Supersampling factor for smoother raster output.
- Transparent SwitchParameter
- Use transparent PNG background.
Outputs
System.Byte[] System.IO.FileInfo
ConvertTo-OfficeVisioPng [-BackgroundColor <String>] -Document <VisioDocument> [-FontCollectionIndex <Nullable`1>] [-FontFaceName <String>] [-FontFilePath <String>] [-NoConnectorLabelOverlapResolution] [-NoConnectorLabels] [-NoStencilArtwork] [-NoText] [-OutputPath <String>] [-PageIndex <Int32>] [-PixelsPerInch <Nullable`1>] [-Show] [-Supersampling <Nullable`1>] [-Transparent] [<CommonParameters>]#Parameter set:
DocumentParameters
- BackgroundColor String
- Background color name or hex value. Use -Transparent for transparent output.
- Document VisioDocument
- Visio document object.
- FontCollectionIndex Nullable`1
- Optional zero-based font collection index.
- FontFaceName String
- Optional font face name used when selecting from a font collection.
- FontFilePath String
- Optional TrueType/OpenType font file used for text outlines.
- NoConnectorLabelOverlapResolution SwitchParameter
- Do not resolve connector label overlaps at export time.
- NoConnectorLabels SwitchParameter
- Do not render connector labels.
- NoStencilArtwork SwitchParameter
- Do not render built-in stencil artwork.
- NoText SwitchParameter
- Do not render shape text.
- OutputPath String
- Optional output PNG path.
- PageIndex Int32
- Zero-based page index to export.
- PixelsPerInch Nullable`1
- PNG pixels per Visio inch.
- Show SwitchParameter
- Open the PNG after saving.
- Supersampling Nullable`1
- Supersampling factor for smoother raster output.
- Transparent SwitchParameter
- Use transparent PNG background.
Outputs
System.Byte[] System.IO.FileInfo