Customize toolbar items

Hi,

I am trying to customize the toolbar with the following code, but it does not work.

pdfviewer = new ej.pdfviewer.PdfViewer({
            serviceUrl: 'https://myurl.com/api/pdfviewer',
            enableFormDesignerToolbar: true,
            locale: "es",
            toolbarSettings: { showTooltip : true, toolbarItem: ['OpenOption', 'FormDesignerEditTool']}
        });

When the PDFViewer is rendered all controls are displayed in the toolbar.

Captura.PNG


What am I doing wrong?

Thank you very much!



4 Replies 1 reply marked as answer

SK Sinthiya Kalimuthu Syncfusion Team August 25, 2022 01:54 PM UTC

Hi Pere,


If you want to customize toolbar item, you must use toolbarItems property instead of toolbarItem in toolbarSettings. We have shared the sample for your requirement. Kindly refer it and revert to us if you have any concerns on it.


toolbarSettings: { showTooltip : true, toolbarItems: ['OpenOption', 'FormDesignerEditTool']}



Sample - https://stackblitz.com/edit/myinxs?file=index.js


Regards,

Sinthiya K


Marked as answer

PA Pere Argelich Romà August 25, 2022 02:08 PM UTC

Hi Sinthiya,

Solved! In the example of your web it appears as toolbarItem, that's why I took the wrong example.

Captura.PNG

Link: https://ej2.syncfusion.com/javascript/documentation/pdfviewer/toolbar/

Thank you very much!



AC ArunKumar Chandrakesan Syncfusion Team August 29, 2022 02:37 PM UTC

Hi Pere,


Thank you for pointing out the error in the documentation. We will get it resolved and publish the page by 1 September 2022.


Regard,

Arun kumar



CK Chinnamunia Karthik Chinna Thambi Syncfusion Team October 12, 2022 10:20 AM UTC

Hi Pere,


We have made the changes in the documentation and it will be reflected in live, tomorrow.


Regards,

CCM Karthik


Loader.
Up arrow icon