Save as web-page - default zoom as 200%?


M

MrTom_AK

How do I save a visio diagram as a web page - then when viewing it have the
default zoom set to 200% (instead of scalable)?

Thanks
-tom
 
Ad

Advertisements

D

Dick Hamilton [MSFT]

Hi Tom,

You can pass in a parameter if the webpage html is hosted on a web server
which will allow you to specify the zoom level.

Example for parameter: http://foo/drawing1.htm?page=Page-1&zoom=200 Note:
Zoom is only available if your Save as Web output format is the default VML
format.

If you are not hosting the webpage html on a webserver, or if you don't want
to use a parameter on the URL to change the zoom level, you can edit the
code in the main htm output file - for example - drawing1.htm.

The PageLoadedDoCallback function needs to be modified as shown below (the
lines beginning with '*' are added):

function PageLoadedDoCallback()
{
if (g_WidgetsLoaded)
{
for( var i=0; i < g_callBackFunctionArray.length; i++ )
{
g_callBackFunctionArray();
}
g_callBackFunctionArray = new Array();

* if (viewMgr && viewMgr.Zoom)
* {
* viewMgr.Zoom(200);
* viewMgr.setView (0, 0);
* }
}
else
{
window.setTimeout("PageLoadedDoCallback()", 500);
}
}
 
D

Dick Hamilton [MSFT]

Sorry - I should clarify that the solution that I've described is for Visio
2003's Save as Webpage output. If you are using Visio 2002's Save as
Webpage output, the following steps will enable you to set the zoom to 200
in your output:

Note: This assumes that you saved your drawing as test.htm. Make the
following changes to these files (in the test_files folder):

1) In the test_vml_1.js file, add the following line in the VMLLoadFunction:

function VMLLoadFunction()
{
m_viewMgr.onLoad();
m_viewMgr.onResize();
m_viewMgr.put_Zoom(200); // <-- Add this line

document.body.scrollLeft = 0;

document.body.scrollTop = 0;

}

2) In the test_zoom.htm file:
Change a 0 to 2 in ResetZoom
function ResetZoom()
{
var formZoom = FindForm('zoomForm', document);
formZoom.zoomFactor.selectedIndex = 2; // <-- Change to 2

--
Dick Hamilton
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.


Dick Hamilton said:
Hi Tom,

You can pass in a parameter if the webpage html is hosted on a web server
which will allow you to specify the zoom level.

Example for parameter: http://foo/drawing1.htm?page=Page-1&zoom=200 Note:
Zoom is only available if your Save as Web output format is the default
VML format.

If you are not hosting the webpage html on a webserver, or if you don't
want to use a parameter on the URL to change the zoom level, you can edit
the code in the main htm output file - for example - drawing1.htm.

The PageLoadedDoCallback function needs to be modified as shown below (the
lines beginning with '*' are added):

function PageLoadedDoCallback()
{
if (g_WidgetsLoaded)
{
for( var i=0; i < g_callBackFunctionArray.length; i++ )
{
g_callBackFunctionArray();
}
g_callBackFunctionArray = new Array();

* if (viewMgr && viewMgr.Zoom)
* {
* viewMgr.Zoom(200);
* viewMgr.setView (0, 0);
* }
}
else
{
window.setTimeout("PageLoadedDoCallback()", 500);
}
}


--
Dick Hamilton
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no
rights.


MrTom_AK said:
How do I save a visio diagram as a web page - then when viewing it have
the
default zoom set to 200% (instead of scalable)?

Thanks
-tom
 
Ad

Advertisements

Joined
Apr 18, 2013
Messages
1
Reaction score
0
THANK YOU SO MUCH!

MS Visio 2003 listed procedure Worked GREAT for me!

My site is a huge diagram, and 200% Zoom scale from scratch looks awesome.

Thank you so much.

Isaí Villarreal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top