Dear Matt,
we load the webviewer into a tab of an ExtJS-tabpanel not into a new browser tab/window:
ExtTabPanelUX.createTab({
html: '<div id="pdfWindow' +
config.id + '" style="height: 100%" />',
listeners: {
afterrender: function() {
(new PDFTron.WebViewer({
type: 'html5',
initialDoc: config.path + '/' + config.urlProxy + '/' +
config.name + '?' + Ext.urlEncode(paramsIniDoc),
path: 'PDFTron',
annotationAdmin: CurrentUser.isAdmin,
enableAnnotations: true,
enableReadOnlyMode: config.readOnlyAnnotations,
annotationUser: CurrentUser.name,
mobileRedirect: false,
config: config.path + '/PDFTron/config.js',
serverUrl: config.path + '/' + config.urlProxy + '/' +
config.name + '?' + Ext.urlEncode(paramsServerUrl)
}, document.getElementById('pdfWindow' +
config.id)));
}
}
}, Labels.Files.FILE + ':' +
config.id).setTitle(
config.name, 'icon' + strExtension);
Then we close the tab. Next time we open a new tab using the same file, it does not load it. Only a blank webviewer is shown.
Regards Kai