ICEPDF Applet | Disable "Save-As" button from toolbar

1.3k views Asked by At

I am using ICEPDF(open source java applet) Applet viewer for my pdf to view in my web without the use of adobe reader. Now i want to disable "Save-As" button from the toolbar available at top. I have extracted jar files and dont know which file to customize. Could any1 help me on the file to be edited so as to hide the save-as option from my toolbar. Please.. Thanks - Haan

1

There are 1 answers

0
malaverdiere On BEST ANSWER

You can work on SwingViewBuilder. Personally, I did the customization by subclassing it and returning nulls for the things I wanted to disable.

EDIT:

SwingViewBuilder has many buildXYZ() methods. It is only required to make such a method return null for each button/menu item/toolbar that is not needed. The rest of the code is handling the nulls gracefully and skips over it.

Specifically, for the "Save-As" feature, you need to change/override buildSaveAsFileButton() and buildSaveAsFileMenuItem().