Answers for "pdftron file from local"

0

pdftron file from local

JavaScript<label for="file_upload">Choose A file</label>
<input type="file" id="file_upload" name="file_upload" accept=".pdf">

<div id='viewer' style='width: 1024px; height: 600px;'></div>

<script>
  const input = document.getElementById('file_upload');

  WebViewer(...)
    .then(instance => {
      input.addEventListener('change', () => {

        // Get the file from the input
        const file = input.files[0];
        instance.loadDocument(file, { filename: file.name });
      });

      const { docViewer } = instance;
      docViewer.on('documentLoaded', () => {
        // perform document operations
      });
    });
</script>fullscreenCopyRelated Links•WebViewerInstance.loadDocument
Posted by: Guest on September-28-2020

Code answers related to "pdftron file from local"

Code answers related to "Javascript"

Browse Popular Code Answers by Language