@ -26,7 +26,7 @@ See https://github.com/adobe-type-tools/cmap-resources
< meta name = "viewport" content = "width=device-width, initial-scale=1, maximum-scale=1" >
< meta name = "google" content = "notranslate" >
< meta http-equiv = "X-UA-Compatible" content = "IE=edge" >
< title > {{_('PDF.js view er')}}< / title >
< title > {{_('PDF read er')}}< / title >
< link rel = "stylesheet" href = "{{ url_for('static', filename='css/libs/viewer.css') }}" >
@ -42,7 +42,8 @@ See https://github.com/adobe-type-tools/cmap-resources
PDFViewerApplicationOptions.set('imageResourcesPath', "{{ url_for('static', filename='css/images/') }}");
PDFViewerApplicationOptions.set('workerSrc', "{{ url_for('static', filename='js/libs/pdf.worker.js') }}");
PDFViewerApplicationOptions.set('sidebarViewOnLoad', 0);
// PDFViewerApplication.open("{{ url_for('serve_book', book_id=pdffile, book_format='pdf') }}");
// PDFViewerApplication.appConfig.secondaryToolbar.downloadButton.setAttribute('hidden', 'true');
// PDFViewerApplication.open("{{ url_for('web.serve_book', book_id=pdffile, book_format='pdf') }}");
PDFViewerApplicationOptions.set('defaultUrl', "{{ url_for('web.serve_book', book_id=pdffile, book_format='pdf') }}");
});
< / script >
@ -124,11 +125,9 @@ See https://github.com/adobe-type-tools/cmap-resources
< button id = "secondaryPrint" class = "secondaryToolbarButton print visibleMediumView" title = "Print" tabindex = "53" data-l10n-id = "print" >
< span data-l10n-id = "print_label" > Print< / span >
< / button >
< button id = "secondaryDownload" class = "secondaryToolbarButton download visibleMediumView" title = "Download" tabindex = "54" data-l10n-id = "download" >
< button id = "secondaryDownload" class = "secondaryToolbarButton download visibleMediumView" title = "Download" tabindex = "54" data-l10n-id = "download" { % if not g . user . role_download ( ) % } style = "display:none;" { % endif % } >
< span data-l10n-id = "download_label" > Download< / span >
< / button >
< a href = "#" id = "secondaryViewBookmark" class = "secondaryToolbarButton bookmark visibleSmallView" title = "Current view (copy or open in new window)" tabindex = "55" data-l10n-id = "bookmark" >
< span data-l10n-id = "bookmark_label" > Current View< / span >
< / a >
@ -228,9 +227,10 @@ See https://github.com/adobe-type-tools/cmap-resources
< span data-l10n-id = "print_label" > Print< / span >
< / button >
< button id = "download" class = "toolbarButton download hiddenMediumView" title = "Download" tabindex = "34" data-l10n-id = "download" >
< button id = "download" class = "toolbarButton download hiddenMediumView" title = "Download" tabindex = "34" data-l10n-id = "download" { % if not g . user . role_download ( ) % } style = "display:none;" { % endif % } >
< span data-l10n-id = "download_label" > Download< / span >
< / button >
< a href = "#" id = "viewBookmark" class = "toolbarButton bookmark hiddenSmallView" title = "Current view (copy or open in new window)" tabindex = "35" data-l10n-id = "bookmark" >
< span data-l10n-id = "bookmark_label" > Current View< / span >
< / a >