Forum Discussion
Visio Javascript API for VIsio Online
Thanks for your help. But there is still some issues, i would like to remove the white margins so the image fills up the whole space, and to completely remove the iFrame´s border .
Hi
You could try the below options to get rid of the extra space and borders.
1. If your diagram canvas has white space, please use 'Fit to Drawing' option available in Visio Desktop. See attached.
2. Use the document.view.hideDiagramBoundry = true; to hide the diagram boundary.
3. Change the width/height of the iFrame to fit your drawing page, by using the below code during initialization:
var session = new OfficeExtension.EmbeddedSession(
url,
{
id: "embed-iframe",
container: document.getElementById("iframeHost"),
width: "400px",
height: "100%"
});
4. There is an API under development for completely hiding the iFrame borders. application.showBorders = false;
The API should be available by March and you could check this page for updates related to this API.
Regards
Rahul Mittal