Answers for "pdfjs add custom event handler to viewer.js"

0

pdfjs customizing viewer.html js event handler

<script>
  // add this script block to viewer.html (pdfjs/web/viewer.html)
  document.addEventListener('DOMContentLoaded', function() {
    console.log('DOMContentLoaded');
  }, true);

  document.addEventListener('webviewerloaded', function(e) {
    console.log('webviewerloaded');
  });
</script>
Posted by: Guest on July-18-2020
0

pdfjs add custom event handler to viewer.js

// you can put anywhere in viewer.js (pdfjs/web/viewer.js) and listens to it
const event = document.createEvent("CustomEvent");
event.initCustomEvent("your_new_event", true, true, {});
document.dispatchEvent(event);
Posted by: Guest on July-18-2020

Code answers related to "pdfjs add custom event handler to viewer.js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language