I’m using the following script from a support chat from earlier today to resize my viewer window. But its not working. Without this script present the viewer works fine. After adding the script (see code below), the viewer never appears. All I see is the gray background of the <div id=“test”…/> window.
As a last resort, I commented out the setWidth, setZoom and setHeight commands. That didn’t help. If I comment out the “containerElement.groupdocsViewer(“on”, “documentLoadCompleted.groupdocs”, function (e)… " command the viewer starts working again (without any resizing). Can you help?
Thanks, Bill
code follows:
<%@ Page Title=“Patient Record Viewer” Language=“C#” MasterPageFile=”~/Site2.Master" AutoEventWireup=“true” CodeFile=“GdViewer.aspx.cs” Inherits=“GdViewer” %>
<%@ Import Namespace=“Groupdocs.Web.UI” %>
<asp:Content ID=“Content1” ContentPlaceHolderID=“MainContent” runat=“server”>
.
.
.
<%= Viewer.ClientCode()
//.SupportTextSelection(false)
.ShowDownload(false)
.ShowFolderBrowser(false)
.ShowPrint(false)
.ShowViewerStyleControl(true)
.TargetElementSelector("
#test
") .FilePath(Session[“ViewerFile”].ToString())
.ViewerInstanceId(“doc_viewer1”)
.EnableRightClickMenu(false)
.ShowThumbnails(true)
.OpenThumbnails(false)
.ZoomToFitWidth()
.Width(970)
.Height(800) %>
</asp:Content>