Commit 913690df authored by xlivevil's avatar xlivevil

Fix #1913(set lazyload in pdf reader)

 Add favicon.ico in pdf reader
parent 19c75d67
...@@ -28,7 +28,8 @@ See https://github.com/adobe-type-tools/cmap-resources ...@@ -28,7 +28,8 @@ See https://github.com/adobe-type-tools/cmap-resources
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{{_('PDF Reader')}} | {{title}}</title> <title>{{_('PDF Reader')}} | {{title}}</title>
<link rel="apple-touch-icon" sizes="140x140" href="{{ url_for('static', filename='favicon.ico') }}">
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/libs/viewer.css') }}"> <link rel="stylesheet" href="{{ url_for('static', filename='css/libs/viewer.css') }}">
...@@ -38,6 +39,8 @@ See https://github.com/adobe-type-tools/cmap-resources ...@@ -38,6 +39,8 @@ See https://github.com/adobe-type-tools/cmap-resources
<script type="text/javascript"> <script type="text/javascript">
window.addEventListener('webviewerloaded', function() { window.addEventListener('webviewerloaded', function() {
PDFViewerApplicationOptions.set('disableAutoFetch', true);
PDFViewerApplicationOptions.set('disableRange', true);
PDFViewerApplicationOptions.set('sidebarViewOnLoad', 0); PDFViewerApplicationOptions.set('sidebarViewOnLoad', 0);
PDFViewerApplicationOptions.set('imageResourcesPath', "{{ url_for('static', filename='css/images/') }}"); PDFViewerApplicationOptions.set('imageResourcesPath', "{{ url_for('static', filename='css/images/') }}");
PDFViewerApplicationOptions.set('workerSrc', "{{ url_for('static', filename='js/libs/pdf.worker.js') }}"); PDFViewerApplicationOptions.set('workerSrc', "{{ url_for('static', filename='js/libs/pdf.worker.js') }}");
...@@ -405,4 +408,3 @@ See https://github.com/adobe-type-tools/cmap-resources ...@@ -405,4 +408,3 @@ See https://github.com/adobe-type-tools/cmap-resources
<div id="printContainer"></div> <div id="printContainer"></div>
</body> </body>
</html> </html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment