Skip to content

Commit

Permalink
fixed pdf print/save/presentation issue
Browse files Browse the repository at this point in the history
  • Loading branch information
akashmdiu committed Jul 16, 2024
1 parent 7ed113e commit 4a094dd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion assets/js/front.js
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,7 @@ function presentationModeForIOS(iframes) {
iframes?.forEach(function (iframe) {
iframe.onload = function () {
var iframeDoc = iframe.contentDocument || iframe.contentWindow.document;
var button = iframeDoc?.querySelector('#presentationMode');
var button = iframeDoc?.querySelector('#presentationMode.presentationMode');
button?.addEventListener('click', function () {
iframe.classList.toggle('presentationModeEnabledIosDevice');
});
Expand Down
16 changes: 14 additions & 2 deletions assets/pdf/web/ep-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -364,11 +364,23 @@ a.secondaryToolbarButton {
display: none
}
}

@media all and (max-width:450px) {
#toolbarViewerRight #editorModeButtons, #toolbarViewerRight #print, #toolbarViewerRight #download {
display: none!important;
#toolbarViewerRight #editorModeButtons, #toolbarViewerRight #print, #toolbarViewerRight #download {
/* display: none!important; */
width: 0;
height: 0;
opacity: 0;
padding: 0;
margin: 0;

}
#toolbarViewerRight {
padding-inline-end: 1px;
width: 66px;
}
}

@media all and (max-width:320px) {
span.loadingInput.start, #numPages {
display: none;
Expand Down
3 changes: 2 additions & 1 deletion assets/pdf/web/viewer.html
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,8 @@

<button id="presentationMode" class="toolbarButton hiddenMediumView presentationMode" title="Switch to Presentation Mode" tabindex="31" data-l10n-id="presentation_mode">
<span data-l10n-id="presentation_mode_label">Presentation Mode</span>
</button> <!-- added by ep developer -->
</button>
<!-- added by ep developer -->

<button id="print" class="toolbarButton hiddenMediumView" title="Print" tabindex="41" data-l10n-id="pdfjs-print-button">
<span data-l10n-id="pdfjs-print-button-label">Print</span>
Expand Down

0 comments on commit 4a094dd

Please sign in to comment.