WebViewer byte range check issue

瀏覽次數:72 次
跳到第一則未讀訊息

Matt Parizeau

未讀,
2014年5月26日 下午1:59:162014/5/26
收件者: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.
回覆所有人
回覆作者
轉寄
0 則新訊息