Skip to content

Commit 6039236

Browse files
Merge branch 'master' of github.com:FranckFreiburger/vue-pdf
2 parents 7d7de6d + 6e07ca0 commit 6039236

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/pdfjsWrapper.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,11 @@ export default function(PDFJS) {
159159
.then(function() {
160160

161161
win.focus(); // Required for IE
162-
win.print();
162+
if (win.document.queryCommandSupported('print')) {
163+
win.document.execCommand('print', false, null);
164+
} else {
165+
win.print();
166+
}
163167
removeIframe();
164168
})
165169
.catch(function(err) {

0 commit comments

Comments
 (0)