Skip to content
  • Home
  • Work
  • About
  • Blog
  • Contact

Embedding PDF and XPS files in Visio Save As Web output

John Goldsmith's profile image

John Goldsmith

22 January 2010
  • Save as Web Page

Header

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

  1. Save your Visio document as a PDF file (File / Publish as PDF or XPS…)
  2. Repeat the above step, this time select XPS as an output format
  3. Select File / Save As Web Page…
  4. Locate the supporting files folder that was created in step 3 and copy and paste the PDF and XPS files into it
  5. 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
  6. For the XPS icon go to http://commons.wikimedia.org/wiki/File:XPSIcon.png  This 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

  1. 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

    ToggleAll
  2. 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
  3. 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 and Bing Maps
  • Escaping from Save as Web Page links

Change log

  • 25 June 2025 Updated Adobe pdf icon link and removed XPS wiki link as page no longer exists.

Microsoft MVP Logo

John has been a Microsoft MVP, in the award categories of Visio and M365, since 2008.

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)

Visio Resources

  • Developing Microsoft Visio Solutions
  • Visio Stencils at ShapeSource
  • Microsoft Visio YouTube Playlist
  • Visio (Product site)
  • Office 2010 Engineering
  • Visio 2016 SDK (Download)
  • Visio JavaScript API reference
  • VisioMVPs.org
Contact

visualSignals ltd
31 Riverview Grove
London, W4 3QL
United Kingdom

+44 (0) 208 078 9120

Around the Web

Copyright © visualSignals ltd 2025

Mastodon