Hi,
I’m having an error viewing multiple documents using the viewer in an ASP.NET application. Please see code below which is giving an Object Reference error. Using Viewer.ClientCode().Stream(this.ByteStream, this.FileName, this.Extension, this.DownloadFileName) however works perfectly as expected.
CodeBehind
public StreamDefinition[] streamDefinitions;
protected void Page_Load(object sender, EventArgs e)
{
streamDefinitions = new StreamDefinition[]
{
new StreamDefinition()
{
FilenameExtension = Properties.Settings.Default.DefaultFormat,
Stream = new FileStream(Server.MapPath(Properties.Settings.Default.DefaultImage), FileMode.Open, FileAccess.Read, FileShare.Read)
}
};
}
Page
<%= Viewer.ClientCode()
.TargetElementSelector(“#MainViewerWindow”)
.Streams(this.streamDefinitions)
.OpenThumbnails(false)
.SupportPageRotation(true)
.ZoomToFitHeight()
%>
Please advise if this is an issue on my side or if there is an error in the DLL?