Skip to content

Commit 94a2fd0

Browse files
committedNov 22, 2024
Add eventlistener to enable print button
1 parent 7c2d1c3 commit 94a2fd0

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
 

‎web/app.js

+6
Original file line numberDiff line numberDiff line change
@@ -2001,6 +2001,12 @@ const PDFViewerApplication = {
20012001
opts
20022002
);
20032003
}
2004+
window.addEventListener("message", event => {
2005+
if (event.data.type === "imagedownload") {
2006+
const printButton = document.getElementById("printButton");
2007+
printButton?.classList.remove("hidden");
2008+
}
2009+
});
20042010
},
20052011

20062012
bindWindowEvents() {

‎web/viewer.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@
329329
</button>
330330
</div>
331331

332-
<div class="verticalToolbarSeparator hiddenMediumView hidden"></div>
332+
<div class="verticalToolbarSeparator hiddenMediumView"></div>
333333

334334
<div id="secondaryToolbarToggle" class="toolbarButtonWithContainer">
335335
<button id="secondaryToolbarToggleButton" class="toolbarButton" type="button" title="Tools" tabindex="0" data-l10n-id="pdfjs-tools-button" aria-expanded="false" aria-haspopup="true" aria-controls="secondaryToolbar">

0 commit comments

Comments
 (0)