instance.UI.loadDocument is incredibly slow on mobile browsers

WebViewer Version: 10.2.3, Full API

Do you have an issue with a specific file(s)? No
Can you reproduce using one of our samples or online demos? No
Are you using the WebViewer server? No
Does the issue only happen on certain browsers? All mobile browsers (Chrome, Safari, DuckDuckGo)
Is your issue related to a front-end framework? React
Is your issue related to annotations? Not that I can tell

Please give a brief summary of your issue:

The call instance.ui.loadDocument() takes ~20 seconds to complete on mobile browsers (iOS Chrome, iOS Safari, iOS DuckDuckGo).

Please describe your issue and provide steps to reproduce it:

The call instance.ui.loadDocument() takes ~20 seconds to complete on mobile browsers (iOS Chrome, iOS Safari, iOS DuckDuckGo). On Desktop Chrome or iPad Chrome, this calls only takes ~1 second.

I have tried the following to increase the speed of loading:

  • Preloading the PDF worker when instantiating WebViewer
  • enabling the Content-Range header
  • Linearizing the PDFs

I have looked at instructions from the following:

Please provide a link to a minimal sample where the issue is reproducible:

  1. I have tried opening on my mobile browser, and while it is mildly slower than on desktop, it does not run into major issues like the one I’m experiencing.
  2. on my mobile device takes a very long time and also errors out with Network Errors.

If this is because of using the Full API, how do you suggest we handle Digital Signatures? Do we need to use the Server products?

Hello Zack,

Thank you for contacting us.

I tried to reproduce your issue using v10.2.3, fullAPI on an iPhone 12, but I didn’t notice any long load times. I had an initial file load using initialDoc in the constructor and I added a button to the UI to load a new document with loadDocument.

Could you try updating to our latest version 10.5 and see if the issues still occurs?

If that doesn’t work, this issue might be highly dependable on the mobile device you are using, could you please provide the following:

  1. Which model (models) of the mobile device you were able to reproduce the issue.
  2. Could you provide us with a video of you loading the said files?
  3. What kind of files are you loading? Are they just PDFs and how large are they?
  4. Could you provide the minimal reproducible sample app for us to test internally? This way we can see how you are using loadDocument.

Also, it would be beneficial if you could send us the files you were using.

A minimal reproducible sample refers to a simplified version of your project where unrelated/unnecessary code has been removed. The issue should still be reproducible in this simplified version. This helps us isolate and understand the problem more efficiently. You can attach your project or provide us with a download link or GitHub repo.

Best Regards,
Darian Chen