Enabling the WebViewer everything works fine (at least for Viewing the PDF). It seems like, only the first part of the PDF is loaded (Bytes 1-200) and the rest is never loaded.
There is no error, that would me point in the right direction. I’m searching for 2 days now and it drives me crazy …
Has anyone have a suggestion how to solve the problem?
Edit: When running the Application in Incognito mode it works as expected. The WebViewer is running in an Angular-Application, where service-workers are enabled if this doesn’t make a difference. The PDF is loaded from another URL.
Hi Chris
Thanks for contacting us for support. I have tried our Angular sample with the latest version 7.3.3 and there seems no issue occurs. Could you please provide more config detail you have? And if you have a specific pdf, could you send me it?
the WebViewer is used within an Angular-App. Which has PWA enabled. We now figured out, that it seems to be a cashing issue, because if i deactivate caching in chrome it is working. Although i’m not sure if it’s a caching Problem from the Angular-Service-Worker or from the PDFTron-Service-Worker.
The Problem occurs with every PDF we have. If i clear cache and load the Application from scratch, the initial loading of the document works, but every other PDF-Document is stuck with the loading circle.
If i pass the WebViewer-Server URL to the constructor, the PDF is loaded correctly.
Maybe it is a configuration-Fault on our side, i tried to use “ngsw-bypass” for our document, but this doesn’t make a difference. Everytime after the initial load, the Network-Tab in Chrome says “load from disk” and/or “load from service worker”.
In Safari everything is working as expected. I know, it is hard to help here, but every tip, that points me in the right direction would be better than now. I searched for two days now, and i’m exactly there were i started.
Hi Chris
I think we may need a sample app to reproduce your issue because we need more information.
What’s more, we don’t think there is a “PDFTron service worker” by default, you would have needed to add it by yourselves.
Maybe there is a work around, you may want to try storing the PDFs themselves in indexedDB as well, you can check https://www.pdftron.com/documentation/web/guides/offline-loading/#store-documents instead of with Service Worker