{% load i18n %} function getOutputScale(ctx) { var devicePixelRatio = window.devicePixelRatio || 1; var backingStoreRatio = ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1; var pixelRatio = devicePixelRatio / backingStoreRatio; return { sx: pixelRatio, sy: pixelRatio, scaled: pixelRatio !== 1 }; } function setFileViewAreaHeight() { $('body').css({'overflow':'auto'}); var file_view = $('#file-view').css({'height': 'auto'}); if ($(window).height() > file_view.outerHeight(true) + file_view.offset().top) { file_view.outerHeight($(window).height() - file_view.offset().top); } } try { PDFJS.workerSrc = '{{MEDIA_URL}}js/pdf.worker.js'; $('#file-view').html('
' + tip + '