File not shown in Chrome every second time

62 views
Skip to first unread message

Kai Brümmer

unread,
Oct 21, 2014, 7:19:34 AM10/21/14
to pdfnet-w...@googlegroups.com
Dear all,

we have a strange behavior in Google Chrome: We open a file in webviewer (latest version HTML5). All is fine. We close the webviewer and try to open the same file again, the file is not loaded into the viewer. We close the viewer and reopen the file, then it works again. Next time not working again, so every second time the file does not show in the viewer. Chrome does not throw any errors.

Can you help on this issue?

Regards Kai

Matt Parizeau

unread,
Oct 21, 2014, 6:58:46 PM10/21/14
to pdfnet-w...@googlegroups.com
Hi Kai,

When you say you close WebViewer and then open it again what do you mean exactly? If you look at our showcase (http://pdftron.com/webviewer/showcase/) it opens multiple documents and seems to work for me in Chrome. Can you send me some sample code that reproduces the issue.

Matt Parizeau
Software Developer
PDFTron Systems Inc.

Kai Brümmer

unread,
Oct 22, 2014, 2:39:26 AM10/22/14
to pdfnet-w...@googlegroups.com
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

Matt Parizeau

unread,
Oct 22, 2014, 8:20:23 PM10/22/14
to pdfnet-w...@googlegroups.com
Hi Kai,

Thanks for the code but I'm not too familiar with using Ext JS. Could you send me a sample project that demonstrates the issue.

Matt Parizeau
Software Developer
PDFTron Systems Inc.
Reply all
Reply to author
Forward
0 new messages