WebViewer byte range check issue

70 views
Skip to first unread message

Matt Parizeau

unread,
May 26, 2014, 1:59:16 PM5/26/14
to pdfnet-w...@googlegroups.com
Q:

I think you disable range queries for the document, if ReaderControl range query fails.
 
Now we have special case, that we have a special range supporting tomcat servlet, which supports range queries. But a normal get of the resource ReaderControl will not answer with a range response, as it is "normal tomcat" response.
Can we force to use range queries on the document itself?

A:

We had considered doing this but the risk is that if the XOD file is very large then if range requests aren't supported it could take a long time for the download to complete. If we just test on the html page then that should be much smaller (probably less than 200KB) and this shouldn't take very long to download the entire file.

You're right though that it doesn't cover the case where the server hosting the viewer is different from the server hosting the XOD document and the server hosting the viewer doesn't support range requests but the other one does. When we added this check we had decided that this was a much less likely case.

To change this behavior you can modify the byteRangeCheck function inside ControlUtils.js. You would also modify (Mobile)ReaderControl.js to pass the document URL to that function so it could be used.
Reply all
Reply to author
Forward
0 new messages