Why is my DocumentContainer so small?

I’m using latest version of PDF.js Express and following the manual integration example from here

But my viewer appear tiny ( see screenshot here )

What am I doing wrong ?! here’s my html :

<!DOCTYPE html>
  <title>PDF.js Express Viewer</title>
<!-- Import PDF.js Express Viewer as a script tag from the lib folder using a relative path -->
<script src='pdfjsexpress/lib/webviewer.min.js'></script>

<div id='viewer' style={{"width":"1024px","height":"600px","margin":"0 auto"}}></div>
    path: 'pdfjsexpress/lib', // path to the PDF.js Express'lib' folder on your server
    initialDoc: 'pdfs/sample.pdf', // lidl
}, document.getElementById('viewer')).then(instance => {
    // now you can access APIs through the WebViewer instance
    const { Core, UI } = instance;

    // adding an event listener for when a document is loaded
    Core.documentViewer.addEventListener('documentLoaded', () => {
        console.log('document loaded');

    // adding an event listener for when the page number has changed
    Core.documentViewer.addEventListener('pageNumberUpdated', (pageNumber) => {
        console.log(`Page number is: ${pageNumber}`);

Hello pdfjs.express,

The container’s CSS wont allow the Viewer’s CSS to fill the container.

Please review your CSS!

Best regards,

Thanks I figured it out, it might be an idea to reference the required css file in the example page though.