Pushing items to header complains that it expects 1

Product: WebViewer

Please give a brief summary of your issue:
I’m trying to push two items to header but for some reason it complains saying that it expects 1 argument, but received two. How can I push more than one button to header?

    UI.setHeaderItems((header) => {
        header.push(customButton, fullscreenButton);

Hi User83,

The correct way to do this would be to push an array of objects or push the objects one at a time

    UI.setHeaderItems((header) => {
        header.push([customButton, fullscreenButton]);
        // OR

Here is the API documentation for Header.push

Best Regards,
Ahmad Moaaz
Software Developer
PDFTron Systems, Inc.