Problem with Customizing the PDF.js Toolbar in "How to Use PDF.js in 2 Easy Steps"


if I use the Full Screen PDF Viewer as told in your How-To and use the Customizing the PDF.js Toolbar it is not working. In the Console of Firefox and Edge-Cromium I get an Error “Uncaught SyntaxError: expected expression, got ‘&’[customToolbar.js:2:37]”

What is going wrong?

Thank you

Hello pumi,

Can you provide the code you are having the error with?

Thank you,

Hello Tyler,

I am using the Full Screen PDF Viewer from pdfjs-3.9.179-dist as shown in the Howto and call it with this URL:
It works good.
But if I use the code of the customToolbar.js to change the Toolbar of the pdf viewer nothing changes. In the console of the developer tools of the Firefox and edge browser I see the error: “Uncaught SyntaxError: Unexpected token ‘&’ (at customToolbar.js:2:38) customToolbar.js:2”
I think that since the HowTo was written, somthing has changed in pdf.js, so your howto is not working with the pdf.js now.

best regards,