How to load different pdf on pdfjs express viewer on passing url through button click

Hi!

You can use the loadDocument API on the WebViewer instance to open documents. You can pass in the URL directly to this api, as long as the URL is publicly accessible.

WebViewer({...}, ele).then(instance => {

    instance.loadDocument(path_to_your_s3_file);

})

You could move the load document call into the buttons onclick handler.

Thanks!
Logan