<!DOCTYPE html>
<html>
    <head>
    <title>PDF.js Express</title>
    </head>
    <!-- Import PDF.js Express as a script tag from the lib folder using a relative path -->
    <script src='../lib/webviewer.min.js'></script>
    <body>
        <div id='viewer' ></div><!--style={{"width":"1024px","height":"600px","margin":"0 auto"}}-->
        <script>
            WebViewer(
                {
                    path: 'WebViewer/lib', // path to the PDF.js Express'lib' folder on your server
                    licenseKey: 'fw3M57212TcYK5XBqwpW',
                    initialDoc: '../resources/ringing_them_bells.pdf'
                }, document.getElementById('viewer'))
                    .then(instance => {
                        const docViewer = instance.Core.documentViewer;
                        const annotManager = instance.Core.annotationManager;
                        // call methods from instance, documentViewer and annotationManager as needed

                        // you can also access major namespaces from the instance as follows:
                        // const Tools = instance.Core.Tools;
                        // const Annotations = instance.Core.Annotations;

                        docViewer.addEventListener('documentLoaded', () => {
                        // call methods relating to the loaded document
                        }
                    );
                }
            );
        </script>
    </body>
</html>