Collapse WebViewer Side Panel on First Load

113 views
Skip to first unread message

Matt Parizeau

unread,
Jun 21, 2016, 4:34:22 PM6/21/16
to pdfnet-w...@googlegroups.com
Q:

What is the simplest way to tell the viewer to have the left side panel collapsed upon first load. Is there a param that be set in the config as in my example below?
 
var myWebViewer = new PDFTron.WebViewer({
    type: "html5,html5Mobile,silverlight,flash",
    path: "/WebViewer/lib",
    initialDoc: "/Preview/Download/" + id,
    streaming: false
}, viewerElement);

A:

The easiest way would be to add code like this:

$(viewerElement).on('ready', function() {
    myWebViewer
.setSideWindowVisibility(false);
}

Reply all
Reply to author
Forward
0 new messages