PDF.js Express Viewer

Hi there,

I am really happy to have found you.
Thank you for the good work you have done in creating this possibility to manage PDF files.

Thanks to your “Professional PDF.js Viewing” we are able to integrate PDFs into the sites we visit with smartdevice browsers.

At the moment I only have a problem with the PDF width management:

I cannot determine the width of the PDF.

I’ve tried changing the instance parameters (‘article’ = ‘viewer’):

But I didn't solve anything.

To help you understand where I’m going wrong, here’s the full code:

WebViewer({ path: 'assets/z-js-pdf-viewer/lib', // path to the PDF.js Express'lib' folder on your server licenseKey: 'arVby9MhRLuYsJFEjhf8', initialDoc: '<?php echo $Article ?>', // initialDoc: '/path/to/my/file.pdf', // You can also use documents on your server }, document.getElementById('article')) .then(instance => { const docViewer = instance.docViewer; const annotManager = instance.annotManager; // call methods from instance, docViewer and annotManager as needed
                                // you can also access major namespaces from the instance as follows:
                                    // const Tools = instance.Tools;
                                    // const Annotations = instance.Annotations;

                                docViewer.on('documentLoaded', () => {
                                // call methods relating to the loaded document
            <div class="col-sm-2"></div>
            <?php include 'assets/php/space.html';?>
            <?php include 'assets/php/space-emotions-violet.html';?>
            <?php include 'assets/php/space.html';?>

With kind regards