Disable http range requests in pdf.js.

A bug in pdf.js or Chrome is causing pdf books to not load.

TNL-488
This commit is contained in:
Usman Khalid
2014-10-01 18:12:30 +05:00
parent e738aceeeb
commit 548b01ab7c
2 changed files with 2 additions and 2 deletions

View File

@@ -106,7 +106,7 @@ def pdf_index(request, course_id, book_index, chapter=None, page=None):
viewer_params += current_chapter['url']
current_url = current_chapter['url']
viewer_params += '#zoom=page-fit'
viewer_params += '#zoom=page-fit&disableRange=true'
if page is not None:
viewer_params += '&page={}'.format(page)

View File

@@ -18,7 +18,7 @@ $(function(){
e.preventDefault();
var url = $(this).attr('rel');
$('#viewer-frame').attr({
'src': '${request.path}?viewer=true&file=' + url + '#zoom=page-fit',
'src': '${request.path}?viewer=true&file=' + url + '#zoom=page-fit&disableRange=true',
'title': $(this).text()
});
$('#viewer-frame').focus();