html5Mobile webviewer on safari iPad crashes with streaming true and large files

153 views
Skip to first unread message

Daniel Soriano Gil

unread,
Oct 24, 2013, 8:19:51 AM10/24/13
to pdfnet-w...@googlegroups.com
I expect you do know that issue 

html5Mobile webviewer on safari iPad crashes with streaming true and large files

We're also very concerned in mobile bandwidth utilization because 'all' our documents are large files (from 4 to 80Mb). One solution is split into smaller files, but we loose some functionality that has to be re-developed.

What do you suggest in such cases?

Matt Parizeau

unread,
Oct 24, 2013, 12:29:21 PM10/24/13
to pdfnet-w...@googlegroups.com
The short answer is that we would recommend streaming be set to false in all cases (mobile and desktop) but first a little background.

The terminology can be a bit confusing, but when you set streaming to true this is for if you are doing a PDF to XOD conversion on the fly on the server.  If for whatever reason you wanted to keep all your files in PDF format on the server and not convert to XOD beforehand, then the streaming option allows WebViewer to start viewing the document before the conversion process has completely finished.  You can read this post for more information about streaming and using a XOD cache (https://groups.google.com/forum/#!topic/pdfnet-webviewer/-twjop95iQ8), however if you can convert your documents to XOD ahead of time then that's what we would recommend.

When streaming is set to false then WebViewer will use HTTP range requests to only request the specific bytes that are required.  So when you initially load the document it will only download the first couple pages and if you then jump to page 100 it will only download the parts required for page 100 and a couple of the surrounding pages.  So if the document is converted to XOD ahead of time then this is the option to choose.  If streaming: true is used when the document is already converted then parts of the document will be streamed to WebViewer as it is downloaded, however the entire file will be downloaded!  One case where we do fall back to this is if either the browser or the server don't support range requests however this isn't very common.

Matt Parizeau
Software Developer
PDFTron Systems Inc.

Support

unread,
Oct 24, 2013, 3:04:25 PM10/24/13
to pdfnet-w...@googlegroups.com
 
To solve the problem set streaming to 'false' and use HttpPartRetriever. This is both faster and more reliable on mobile devices than downloading the entire file in memory (which happens with streaming). So using HttpPartRetriever is the recommended way to load documents in WebViewer.
 
Even if you do not want to store the entire doc repository as XOD cache you could keep a cache or recently accessed documents. An added benefit is that this will also remove a significant load from your server :)
 

On Thursday, October 24, 2013 5:19:51 AM UTC-7, Daniel Soriano Gil wrote:

Daniel Soriano Gil

unread,
Oct 25, 2013, 5:15:36 AM10/25/13
to pdfnet-w...@googlegroups.com
My bit confusion has been overcome. Thanks a lot, you've done a good^10 product.
Reply all
Reply to author
Forward
0 new messages