Add custom button to the Menu

Which product are you using?
PDF.js Express Plus

PDF.js Express Version

Detailed description of issue
Is it possible to add a custom button to the Menu? (the one that has the full-screen, dark mode, and print links)
We’re only able to add a custom button to the main bar so far.

Thank you.

Hey! This code should do the trick:

    type: 'actionButton',
    img: 'IMG_SRC_HERE',
    onClick: () => {
      // action here
    dataElement: 'UNIQUE ID HERE',
    label:'Button Label'

If you want to change the order of the items, you can call getItems, then rearrange the array how you wish, then pass the new array to update


1 Like

Thanks @Logan it worked, that was exactly what we were looking for.

Thanks again!

1 Like