Visio Viewer macro

This article provides a description of the Visio Viewer macro and its parameters.

Features

  • Render Visio diagrams from an attachment or a file on the file system, a URL, or a profile

  • Specify advanced Visio control parameters

  • Automatic conversion to SVG image format if Internet Explorer (IE) rendering is not available

Basic use

Macro name

Visio Viewer macro

Macro syntax

{visio}

Parameters

General parameters

Macro browser label

Default

Description

Macro parameter

Macro browser label

Default

Description

Macro parameter

Location of the Visio file

Most recent Visio file uploaded to the current page

A required parameter that is equivalent to the default parameter. It specifies the location of the Visio file.

  • ^attachment - Data is read from an attachment on the current page.

  • page^attachment - Data is read from an attachment on the page name provided.

  • space:page^attachment - Data is read from an attachment on the page name provided in the space indicated.

file

Profile



Select the profile name to be used to access the files from a remote location. Profiles contain a basic set of parameters used to access a remote location such as the type of URL, user credentials, and so on. Refer to this link to know more about creating profiles. 

  • Contact your Confluence administrator for further information about the profiles available in your instance.

  • If a profile is specified, it is recommended to provide the relative path to the location of the Visio file to be rendered.

profile

URL to Visio file



Enter the URL to retrieve the Visio file from its actual remote location. Data is read from the specified URL. 

Only valid, raw URLs are used in the URL to Visio file parameter. A raw URL is defined as the part of the URL following the domain information and includes the query string, if present. For example, in the URL string http://www.contoso.com/articles/recent.aspx, the raw URL is /articles/recent.aspx.

Precedence in URL handling

URLs are processed using a fixed precedence explained as follows:

  1. If the given URL is linked to a specific application like Bitbucket, GitLab, or GitLab, the macro does not require any user credentials, and processes and renders the given file. Refer to this article for information about application links.

  2. If Profile is specified, the macro appends the URL given here with the URL specified in the profile configuration, and accesses the location to render the required file.

  3. Lastly, if no application links or profiles were given, the URLs are processed as-is and the required file is rendered.

url

URL connection timeout



Enter time in milliseconds to wait until the URL connection disconnects before getting data. Use this to increase time needed for slow connections. Note that if a zero is given, the connection may wait infinitely.

timeout

Output type



Specify the value of default option. Controls how Visio diagrams are displayed. Affects all Visio Viewer macros that do not have a specific output parameter value.

  • default - Display output as configured by an administrator in Global configuration.

  • best - Display output in an optimal format based on system and browser used. Requires Visio control on Internet Explorer (IE) capable browsers. Use only if conversion support has been installed and enabled in your Confluence instance. Refer to How to install SVG conversion support.

  • visio - Display output using Internet Explorer Visio control. Requires Internet Explorer (IE) or IE tab capable browser on Windows.

  • svg - Display output as SVG image. Use only if conversion support has been installed and enabled in your Confluence instance.

output

Page images to display



Enter a comma-separated list of pages in the Visio file to be displayed. When the Visio viewer control is used, all the pages of the Visio file are displayed, rather than just the specific pages in the specified list.

pages

Message when IE render is not available



Enter the message to be displayed when Internet Explorer (IE) render is not available to show the diagram. Leave the field empty to display nothing, else a default message is shown.

ieMessage

Customize viewer control code



Enter a code snippet to customize the output of converted images. For advanced users only!

codeBase

Attachment name for converted page images



Specify the base name of the image attachment to use, create, or update. The output can be saved to an attachment for converted images only. Example: visio.svg or space:my page^visio.svg.

If the Visio file contains only one page, the attachment takes the file's name. If the Visio has more than one page, then #1, #2, etc... is appended to the end of the base name.

attachment

Attachment version



Specify how the generated page images are treated as an attachment. The options are as follows:

  • new - a new attachment version is created every time the page is rendered. Consider using the Cache Macro with this option.

  • replace - the attachment is first removed and then replaced every time the page is rendered.

  • keep - an existing attachment is used if available. The attachment is regenerated only if it is removed by some other mechanism.

attachmentVersion

Attachment comment



Enter a comment to be used when the attachment is created or updated.

attachmentComment

Visio viewer control parameters

These parameters are passed to the Visio control itself. Refer to the numerous Visio Control and similar documentation for more details. For example, view Visio 2003 Control related articles.

Macro browser label

Default

Description

Macro parameter

Macro browser label

Default

Description

Macro parameter

Width of diagram

100%

Enter the width to be used for the Visio diagram in pixels or percent (%).

width

Height of diagram

700

Enter the height to be used for the Visio diagram in pixels.

height

Background color

white

Enter the background color to be used for the diagram.

bgColor

Page color shown in page view

silver

Enter the color for the page to be used when the diagram is shown in page view.

pageColor

Show Visio page view

false

Enable this option to show Visio page view.

pageView

Show grid in page view

false

Enable this option to show the Visio diagram in a grid on page view.

grid

Show page tabs

false

Enable this option to show Visio page tabs.

pageTabs

Initial page to show

0

Enter the initial page number of the Visio diagram to be shown. The page at which the diagram was saved is shown, by default.

pageIndex

Show diagram show bars

false

Enable this option to show scroll bars within the rendered Visio diagram.

scrollBars

Show toolbar

false

Enable this option to show the Visio Viewer control toolbar.

toolbar

Show viewer control with right click

true

This option enables the display of Visio Viewer control menu when right-clicking the diagram. Disable the option if access to the Visio Viewer control is to be disallowed.

contextMenu

Show property dialog in menu

true

This option enables the display of the Properties dialog from the context menu. Disable the option to hide the diagram properties.

propertyDialog

Zoom value

-1

Specify a zoom percentage as a fraction (for example, 0.5 for 50% and 1.0 for 100%), or use any of the following values:

  • -1: Whole page view (default option)

  • -2: Page width view

  • -3: Last zoom percentage

zoom

Show in highest quality

true

This option enables the display of the diagram in the highest quality. Note, the higher the quality, the longer it takes to display the diagram.

highQuality

Show viewer control errors

true

This option displays the Visio Viewer control errors, if any. Disable to hide all errors.

alerts

Additional links

 


Find answers from the community.

Ask a question to the community.

Log a request with our support team.

Confluence®, Jira®, Atlassian Bamboo®, Bitbucket®, Fisheye®, and Atlassian Crucible® are registered trademarks of Atlassian®
Copyright © 2005 - 2024 Appfire | All rights reserved. Appfire™, the 'Apps for makers™' slogan and Bob Swift Atlassian Apps™ are all trademarks of Appfire Technologies, LLC.