Mobile problem load xod

50 views
Skip to first unread message

Jorge Espinoza

unread,
Mar 2, 2016, 3:00:15 PM3/2/16
to PDFTron WebViewer
Hi

We need use version mobile in a PHP file. we change to the file MobileReaderControl.html for MobileReaderControl.php and We change html5MobilePath in the WebViewer.js with the value. 

When we change the extension from HTML to PHP the response is: Object {readyState: 4, responseText: "<!doctype html>↵<html>↵    <head>↵        <meta ch…d -->↵   ↵        ↵        ↵↵↵    </body>↵</html>", status: 200, statusText: "OK"}
ControlUtils.js:299 

HTTP range requests not supported. Switching to streaming mode.

How can I use a PHP with Mobile version?

Thanks
Captura de pantalla 2016-03-02 a las 4.46.50 p.m..png

Anatoly Kudrevatukh

unread,
Mar 3, 2016, 2:46:26 PM3/3/16
to PDFTron WebViewer
Hello Jorge,

If your servers that host XOD files support byte range requests, in ControlUtils.js you could change byteRangeCheck function to always return onSuccess(206);

From the comment to this function:
// determine if the browser and server support the range header so we can decide to stream or not
// note that this will not handle the case where the document is on a different domain than the viewer
// and one server supports range requests and the other doesn't
Reply all
Reply to author
Forward
0 new messages