Chris Hopkins Visilog
Chris’ blog provided the code samples used in this section
http://blogs.msdn.com/chhopkin/archive/2009/12/16/visio-services-mashup-api-walk-thru.aspx
Announcing SharePoint 2010 and Visio Services
http://blogs.msdn.com/visio/archive/2009/10/20/announcing-sharepoint-2010-and-visio-services.aspx
Using a Visio Process Repository
http://blogs.msdn.com/visio/archive/2009/10/22/using-a-visio-process-repository.aspx
Introducing Visio Services
http://blogs.msdn.com/visio/archive/2009/10/30/introducing-visio-services.aspx
Publishing Diagrams to Visio Services
http://blogs.msdn.com/visio/archive/2009/11/03/publishing-diagrams-to-visio-services.aspx
Embedding a Web Drawing in a SharePoint Page
http://blogs.msdn.com/visio/archive/2009/11/05/embedding-a-web-drawing-into-a-sharepoint-page.aspx
Installing and Configuring Visio Services
http://blogs.msdn.com/visio/archive/2009/11/12/installing-and-configuring-visio-services.aspx
Visio Services overview (SharePoint Server 2010)
http://technet.microsoft.com/en-us/library/ee663485(office.14).aspx
Plan Visio Services security (SharePoint Server 2010)
http://technet.microsoft.com/en-us/library/ee663483(office.14).aspx
Publishing and viewing Visio Solutions Export Formats Available
The exporting process from Visio is fairly straightforward. One of the more complex parts of this process can be choosing the file format that you want to export to. Granted, in some situations you may know the exact format you need. Other times you may have many formats that will work.
When making the decision for which format to choose, you will need to consider the follow:
-
What the ultimate end of the drawing is for (e.g. web publishing)
-
Other applications downstream and their preferred formats
-
Need for Vector or Raster information
The file formats available from the Save As dialog in Visio 2010 Professional can be broken down into seven main areas:
-
Visio Formats
-
CAD Vector Formats
-
Raster Formats Used With Web
-
Web Page Solution
-
Generic Metafile Formats
-
Generic Bitmap Formats
-
PDF and XPS Formats
The drawing below shows a mapping of these areas to actual file extensions.
Filter Conversion Basics
All file formats in the Save as Type list beyond the Visio formats all go through some kind of filter conversion. With some of the filters you are presented with additional settings after selecting to save the file.
One crucial concept to understand with file conversion is that there is an inherent possibility for loss of data when converting images from one format to another. Although the loss might not be evident in some conversions, it will likely be evident in others. Where you might notice this greatest is going from a vector based format to other vector based formats, such as to and from CAD formats.
As you recall from other sections in this text, Visio uses a vector-based format. Vector formats define how to draw the image using sets of graphic primitives, lines, polygons, etc. Some formats use graphic entities that may not exist in the other formats at all. As the data gets filtered from one format to another there may not be adequate ways to describe the data in the new format. It is analogous to translating from one language to another, like French to English, where there are words in one language that simply cannot be expressed in the other language.
Converting from vector to raster images also involves some possible loss. Generally the image should look pretty similar to the original image, but there is at a minimum a loss of functionality. The image is now a series of dots, not entities that can be edited.
Common Filter Options
When you export to some formats you are presented with a screen of additional settings to use in the filter process. Although these settings vary between individual filters, there are some common filter settings. Some filters allow you to access and store selected settings as a “profile”. Described below are some of the common settings for the graphics filters in Visio:
Vector Graphics Filter Settings -
Color Translation - How to map the colors during conversion, i.e. Inverse. Typical setting is Normal.
-
Line Cap Mode - How should line ends be handled? Device indicates use only line ends supported by the file format and Stroked indicates to try and emulate the line ends.
Raster Graphics Settings
General Section (varies by filter)
-
Color Settings
-
Compression Settings
Transformation Section
-
Rotation
-
Flip image horizontal and/or vertical
Resolution Section - How many dots per inch for the raster image?
-
Screen - Current screen resolution. This is the default setting for resolution.
-
Printer - Current printer resolution
-
Source - Determined by Visio
-
Custom - Your own settings
Size Section - What image size to use for the raster image? Not completely independent from resolution (i.e. Resolution of Screen and Size of printer gives small image, Resolution of Printer and Size of Printer gives image of size equal to display size)
-
Screen - Size of image as displayed by Visio
-
Printer - Size image would print based on current resolution and current printer resolution
-
Source - Determined by Visio based on what size the image is in Visio. This is the default setting for size.
-
Custom
Publish for visualization only
If the objective is to produce images that can be viewed, but not interacted with, then the options are exporting to one of the graphic formats or saving the drawing in PDF or XPS formats.
Export to Graphics
Visio 2010 supports the exporting of the Visio image into many different graphical file types. In addition to the native XML and binary formats, you can also save your drawing in any of the following formats:
-
Scalable vector graphics (.svg)
-
Scalable vector graphics compressed (.svgz)
-
Autocad drawing (.dwg)
-
Autocad interchange format (.dxf)
-
Web Page (.htm, .html)
-
Web Drawing (.vdw)
-
Compressed Enhanced Metafile (.emz)
-
Enhanced Metafile (.emf)
-
Graphics Interchange Format (.gif)
-
JPEG Interchange Format (.jpg)
-
PDF (.pdf)
-
Portable Network Graphics (.png)
-
Tag Image File Format (.tif)
-
Windows Bitmap (.bmp, dib)
-
Windows Metafile (.wmf)
-
XPS Document (.xps)
How to Export Your Drawing
Exporting your Visio drawing is as simple as choosing File > Save As from the ribbon and changing the selected file type in the Save As dialog. For many of the options available in the Save As Type list, an additional dialog will be presented with specific settings for the file type chosen. We will cover some of these settings further in this section.
You may export the entire Visio drawing page or portions of your drawing. To export a portion of the drawing, select the shapes you want to export and then choose the File > Save As menu option. If nothing is currently selected then the entire drawing page will be exported.
With the exception of the Save as Web Page option, multiple-page Visio drawings will need to be exported page by page.
Save As dialog showing some of the Save as type options
Save as PDF and Save As XPS
Newly introduced to Visio 2007, is the capability (available via a separate download) to save a Visio drawing into PDF or XPS format. Installing the free download will add the Publish as PDF or XPS option to the File menu. It will also add the PDF and XPS options to the Save As dialog. Without the download installed these options will not be seen from the user interface.
XPS (XML Paper Specification) is a general purpose Microsoft document format, based on the Open Packaging Conventions. These conventions “describe the method for packaging information in a file format, describing metadata, parts, relationships, and the application of digital signatures.”
XPS is natively supported in Microsoft Windows Vista, and supported on other platforms through a free downloadable viewer.
Note:
|
The XPS viewer can be downloaded from http://www.microsoft.com/whdc/xps/downloads.mspx
|
PDF
The addition of Save as PDF to Office 2007 supports overall themes of content sharing and workflows and supporting complete customer scenarios around content. Office-generated PDF fits into these scenarios in a couple of ways: distribution and sharing, where customers can easily create PDF versions of their Office documents for distributing broadly, either online, via e-mail, or printed, and archiving, where customers can preserve their work for later retrieval and reuse. This fits in well with the overall direction Microsoft has been heading with the Office file formats. It’s why Microsoft decided to move to Open XML formats as the default formats, and it’s what motivated Microsoft to build PDF support directly into the products.
In order to support these scenarios, the goals for PDF generated by Office 2007 are that it: maintains fidelity to the original, is printable, is accessible, is navigable, and supports the PDF features important to the success of these scenarios.
Here is a quick overview of PDF features supported in Office-generated PDF:
Native PDF creation—saving as PDF is supported from within Microsoft Office 2007 applications Word, Excel, PowerPoint, Access, Visio, Publisher, InfoPath, and OneNote.
Quality/intent settings—Most applications, including Visio, provide support for two “intent” settings: Standard, for publishing files online and printing, and Minimum Size, for online sharing. The intent settings control the level and type of image compression for various image types and font embedding and sub-setting options.
Internal and External Hyperlinks—PDF documents preserve internal and external hyperlinks assigned to text and other objects in the original file.
Tagging and accessibility features—PDF for most applications includes basic document structure with tagged content elements. The tags support logical reading order, alternative text on images and on text that is represented as an image in the PDF output, and Unicode representation for nonstandard glyphs.
Document outline—also known as “bookmarks” used for document navigation in PDF viewers.
Document properties—Metadata properties associated with the file.
To save or publish a drawing in PDF format: -
Choose File > Save As and then select PDF as the Save as type
-
Once the dialog appears the Options button may be chosen for setting various output options
-
Select Save.
Save as > PDF
XPS
XPS, or the XML Paper Specification, is Microsoft’s new electronic paper format for exchanging documents in their final forms. This is a Microsoft Office feature that provides a one-way export from Office client applications such as Visio to an application- and platform-independent, paginated format.
Unlike the Office Open XML Formats, XPS does not attempt to capture the full structured richness of an Office document. As an electronic paper format, its purpose is to provide a high fidelity representation of the output only. Because of this, creation of an XPS document from Office is a one-way, export operation.
Why is this important?
XPS is an electronic paper format built around the same Open Packaging Conventions document structure as the new Office file formats. This means a Zip container and XML content. As such it plays well with other technologies like Microsoft Information Rights Management (IRM) and is open to developers to read and write, using APIs in the Windows Presentation Foundation or any other tools capable of working with XML and Zip. This openness makes XPS convenient for a range of scenarios in which it is useful to inspect or modify the contents of the “paper” programmatically.
How does this relate to the XPS print driver?
The Windows Digital Documents team is delivering a print driver with Windows Presentation Foundation that will enable all applications that can print to create XPS files. The support for XPS output in Office 2007 goes beyond what is typically passed to a printer, including the supporting information to enable, for example, working hyperlinks, searching, efficient representation of transparency and gradients, accessible documents, and document rights when the source document has restricted IRM rights.
How do I view an XPS document?
An XPS viewer is required. Microsoft is delivering viewers for Windows Vista and down level versions of Windows, with Windows Presentation Foundation, and directly or through partners, for a range of other platforms. The XPS viewer can be downloaded from http://www.microsoft.com/whdc/xps/downloads.mspx.
More information about XPS is available from the following sources: -
There are a couple of good blogs on MSDN that provide information on the development of XPS and its use in Office 2007
http://blogs.msdn.com/jeff%5Fbell/ http://blogs.msdn.com/andy_simonds/default.aspx
-
An MSDN article titled “A First Look at APIs for Creating XML Paper Specification Documents”, by Bob Watson. Also note the sidebar with this article called “Three Paths to High Fidelity”.
http://msdn.microsoft.com/msdnmag/issues/06/01/XMLPaperSpecification/default.aspx
To save or publish a drawing in XPS format: -
Choose File > Save As and then select XPS as the Save as type
-
Once the dialog appears the Options button may be chosen for setting various output options
-
Select Save.
Save as > XPS
Lab 2.5: Exporting to other formats
Create PDF and XPS files. What are some things to look for and what are some limitations?
Lab Objectives:
-
What are the differences (if any) in creating these two types of output?
-
Explore the options available for creating PDF and XPS files.
-
Explore the features of working with PDF and XPS files
Exercise: Create PDF and XPS files -
Create a multi-paged Visio drawing or use one of the sample files. Try orienting some of the pages in different directions or make the page sizes different.
-
Save this drawing in PDF output. Open the PDF just created, traverse the drawing pages. Save the drawing again, but this time choose the Options button and choose different options. Open the PDF and note any differences. Search for a text string in the resulting PDF. Is the search case sensitive?
-
Save this drawing in XPS output. Open the XPS just created, traverse the drawing pages. Save the drawing again, but this time choose the Options button and choose different options. Open the XPS and note any differences. Search for a text string in the resulting XPS. Is search case sensitive?
Publish for visual data
When the objective is to create Visio data in a form that can be interrogated (to a limited extent) without requiring the user that is viewing the drawings to have Visio installed, the options are Save as Web Page or use the Visio Viewer.
Save as Web Page (HTML)
One special type of export available from Visio is the Save as Web Page option on the File menu. This export varies from the previous export options discussed in a number of ways.
Even though the file extension listed is *.htm, *.html, there are many files generated with this export rather than simply one html file. The html file created references the other files that are generated for the output. By default, there is actually a folder created with a name matching the html file that contains all of the supporting files referenced by the html file. The Save as Web Page is actually a complex solution involving many dialogs and options for inputs and generating many files as the output.
This export uses other filters when generating its output. Since an HTML file is not a graphics file, the image from your Visio drawing must be saved in a graphics file format that can then be displayed on the new web page. The types of graphics files that the Web Page solution can utilize include the common raster formats used on the web, GIF, JPG, PNG, as well as a vector web format called VML. By default, if you are using Internet Explorer 5.0 or greater, the selected format will be VML and a second format, GIF, will be used as well for compatibility of your generated web page with older browsers. Effectively a dynamic web page and multiple graphics files are exported.
Note:
|
Settings from the graphics filters for GIF, JPG, and PNG are shared with the normal exports for GIF, JPG, and PNG.
|
This export works on multiple page documents with one export rather than only one page at a time. The generated HTML page can automatically have navigation added to go between exported pages.
This export makes use of XML and some advanced features of web browsers to expose Visio drawing data and multiple hyperlink information with the HTML output file. Data you add to shapes as Shape Data can now be viewed in the web browser as you mouse over a shape. In addition, multiple hyperlinks for each shape may be accessed from the web browser. Clicking on a shape with multiple hyperlinks will bring up a list of the hyperlinks for the shape for individual selection. Note that for older browsers, only the one hyperlink set as the default hyperlink will be visible.
Note:
|
Choosing File > Save As and then selecting Web Page from the Save as Type list box is the same as selecting File > Save as Web Page. In each case the Save As dialog box is displayed and the Publish button is added in the bottom right portion of the dialog.
|
Export should generally begin from the Save As dialog by pushing the Publish command button rather than the Save button. The Publish button takes you to the dialogs for setting the options for Web Page solution. The Save button will generate a new web page with the options that were set the last time the Publish command was used.
Shape data and multiple hyperlinks are availabe in Visio files exported to a Web Page
Save As Web Page Options
When you select the Publish command button you are taken to a dialog box for the Save as Web Page solution. There are two tabs on the dialog box, General, and Advanced.
The General tab allows you to decide which pages will be exported from your Visio drawing. You can select individual pages in a range or the entire document. Also available are a choice of publishing options including:
-
Details (shape data)
-
Go to Page (navigation control)
-
Search Pages
-
Pan and Zoom
On the Advanced tab the output formatting options are chosen. These include: VML, SVG, JPG, PNG, and GIF. This is where you determine which graphics format will be used for the web page. Selecting VML or SVG for your primary output type allows you to select a secondary output type for compatibility with older browsers. Filter settings for PNG, JPG, and GIF can be altered by doing a separate export directly through the filter before running the Save as Web Page solution.
In the Display Options section under the Advanced tab you can choose the screen size, but note that this option only works for the PNG, JPG, and GIF options.
Also in the Display Options of the Advanced tab the Style sheet can be set. The Style sheet controls the color choices of the publishing options chosen on the General tab.
Save as Web Page
Try It! Publish to the Web
In this exercise, make a Visio drawing ready for web publication using the Save as Web features. In the process explore the publishing options.
-
Create a simple Visio drawing or open one of the sample files. It should have multiple drawing pages. It should also include Shape Data.
-
Choose File > Save as Web Page.
-
Choose VML as the output format and view the results in the web browser.
-
Choose SVG as the output format and view the results in the web browser.
-
Choose GIF as the output format, change the target monitor to a different size, and view the results in the web browser.
-
Set the Style sheet option and view the results in the web browser.
Visio Viewer
Overview
The Visio Viewer 2010 enables anyone to view Visio 2010 (and earlier) drawings inside their Microsoft Internet Explorer version 5.0 or later Web browser.
Visio users can freely distribute Visio drawings and diagrams to team members, partners, customers, or others, even if the recipients do not have Visio installed on their computers. The Visio Viewer enables users to discover the advantages of using Visio drawings, charts, and illustrations in a Web-based environment. It is particularly useful for teams that need to collaborate from different locations where not all team members have access to the full functionality of Visio 2010.
Viewing Visio drawings is as simple as double-clicking the drawing (files with the .VSD, .VSS, .VST, .VDX, .VSX, or .VTX extension) in Windows File Explorer. Internet Explorer will open, and the Visio Viewer will render the drawing in the browser window. You can then pan and zoom in the drawing window by using toolbar buttons, keyboard shortcuts, or menu items in the right-click menu. Also, you can see properties on any shape by opening the Properties and Settings dialog box and then selecting a shape. Some rendering and display settings are available in the Display Settings tab of the Properties and Settings dialog box. Additionally, drawing-layer visibility and colors can be set in the Layer Settings tab, and annotation visibility and colors can be set in the Markup Settings tab.
System Requirements -
Supported Operating Systems:
-
Windows 7
-
Windows Vista
-
Windows XP
-
Windows 2003 Server
-
Windows 2008 Server
-
Microsoft Internet Explorer (IE) 5.0 or later
Note:
|
Both Visio Binary (.VSD) and XML (.VDX) files are supported, as well as stencils and templates.
|
Note:
|
The Visio Viewer is implemented as an ActiveX control that loads and renders Visio drawings inside Internet Explorer or in the Microsoft Office Outlook preview window.
|
Non Visio users – viewer/previewer
You can share a Microsoft Office Visio drawing with someone who does not have Visio, as long as they have the Microsoft Office Visio Viewer or the Outlook 2007 Previewer installed.
The Visio Previewer in Outlook
Because the Visio Previewer is automatically loaded when the user loads Outlook 2007 or later, a user can simply click on the Visio attachment from within the Outlook message. Outlook will offer the user the ability to preview the Visio drawing along with a warning about previewing unrecognized files.
Figure - Outlook 2007
To preview the file from within Outlook 2007, simply click the Preview file button and the Visio diagram is displayed in the Outlook Viewing pane.
What you can do when previewing a drawing
The Visio drawing is shown in the viewing window of Outlook. Page tabs are displayed so traversing from page to page is easy. A right click on the drawing will display zoom capabilities and a menu to go to another page. Visio keyboard short cuts for pan and zoom are active in the message window.
What you cannot do when previewing a drawing
There is no ability to select items in the drawing or change the image in any way. There is no ability to see shape data information in the preview window.
Publish for data only
Sometimes your only requirement is to be able to get data out of Visio, but not view the drawings. By saving in XML format (Visio .vdx file type) you can then create programs that read text to read and modify Visio data.
For example, shape data is stored as text in the .vdx file. It could be read and changed by software using simple text editing techniques.
Note:
|
Visio supports the UNICODE character set which enables almost all written languages to be represented using a single character set.
|
Manage Visio files with SharePoint® Technologies
Microsoft Windows SharePoint Services is a versatile Windows Server technology that provides rapid, low-cost implementation of information-sharing tools, robust storage and collaboration infrastructure, and a foundation platform for building new Web-based applications and services. More information about Microsoft Windows SharePoint Technologies can be found at http://www.microsoft.com/sharepoint
Windows SharePoint Services (WSS) is a product that enables workgroup collaboration. It contains basic capabilities to support file sharing, check-in, and check-out.
Users can access files stored in a WSS library either from the SharePoint site itself or directly through Visio. Accessing files through a SharePoint site provides a team with Check-in and Check-out capability, and the ability to view and edit files. Editing of data can be done with Internet Explorer or directly within Visio. When editing a drawing through the SharePoint site, the user is prompted to save and Check-in changes or discard changes when the drawing is closed.
Using a Visio Process Repository
The Visio Process Repository is a new SharePoint site template that is available out of the box with SharePoint 2010. It leverages SharePoint’s collaboration features -- including check-in and check-out, versioning, and workflow -- and integrates with several of Visio’s new process management features. The result is that in just a few clicks, a SharePoint administrator can create a Visio Process Repository that is pre-configured for easy storage and management of Visio process diagrams.
Below is the home page of an example Process Repository:
As shown in the sidebar above, a Repository site contains a library for documentation, a task list, and a discussion board. But most important is the “Process Diagrams” document library, which is designed to store processes. This document library comes pre-populated with several templates that can be used to create new process diagrams. (However, you can store other diagram types in a Repository; these particular templates are available simply for convenience.)
Let’s say you use the Cross-Functional Flowchart template to create the following diagram in Visio:
Once you’re finished and (optionally) have checked your diagram for errors using the Validation feature, you can save your document back to the Repository through the “Save to SharePoint” billboard in the Backstage:
Then, when you navigate back to your Repository, your process diagram will be listed in the Process Diagrams document library as shown in the image below. Note the two special columns marked by the red rectangles:
-
The Keywords column displays the swimlane headings of each cross-functional flowchart in the document library. The diagram above had swimlanes titled “Engineering” and “Management”; these swimlanes are reflected in the document library below, providing useful at-a-glance information on who is involved in the process.
-
The Category column displays the validation status of each document. This makes it easier for administrators and managers to monitor whether the processes in their Repository conform to their organization’s standards.
Since the Process Repository is built on top of SharePoint 2010, you can also take advantage of other SharePoint features. For instance, you can configure workflows, set up automatic email notifications for when documents change, and view revision history for a given document. Also, with Visio Services users can view the processes in their browser in a single click, even if they do not have Visio installed on their computers. For instance, this is what the above cross-functional flowchart looks like when viewed in a browser:
Share with your friends: |