Embedding PDF and XPS files in Visio Save As Web output

John Goldsmith

There was a recent question in the newsgroups asking how you could print the correct drawing frame in Visio’s Save As Web output. David Parker suggested including a PDF file in the process and creating a link to it, so I thought I’d look at one way of achieving this.
The basic process is as follows:
- Save the files you want to make available
- Create the Save As Web output
- Copy the files to the Save As Web support folder
- Add the required links to the html
Walkthrough – creating the files
- Save your Visio document as a PDF file (File / Publish as PDF or XPS…)
- Repeat the above step, this time select XPS as an output format
- Select File / Save As Web Page…
- Locate the supporting files folder that was created in step 3 and copy and paste the PDF and XPS files into it
- For the PDF icon go to https://www.adobe.com/legal/permissions/icons-web-logos.html and download the ‘large’ (32x32) image and save it to the supporting files folder, naming it pdficon.gif
- For the XPS icon go to
http://commons.wikimedia.org/wiki/File:XPSIcon.pngThis file is 256x256 pixels so you need to reduce its size to 32x32 using an image editor. (Paint.net is free if you don’t have one already.) Save the resulting smaller image to the supporting files folder and name it xpsicon.png
So you now have all of the files you need and in the correct place. The next stage is to wire up the UI so the files are easy to get to.
Walkthrough – creating the code
-
Open the widgets.htm file, located in the supporting files folder, in a text or code editor and search for
if(this.Details)
and insert the following directly above - Next, search for the opening Details div tag -
<div id="divDetails" class="holder" dir=ltr>
and above it, insert the html from this zipped text file - Save the
widgets.htm
file and you’re done
If you’re interested adding other content types in the toolbar you can have a look at the following posts:
Visio Blogs
- Bill Morein (via Wayback Machine)
- Chris Castillo (via Wayback Machine)
- Chris Hopkins (via Wayback Machine)
- David Parker
- Eric Rockey
- Jesse Phillips-Mead
- John Marshall
- Michel LAPLANE (FR)
- Nikolay Belyh
- Saveen Reddy (via Wayback Machine)
- Visio Guy
- Visio [Product] Blog
- Visio Insights (via Wayback Machine)