Does anyone know if it’s possible to disable individual buttons from working on the PDF Viewer toolbar in the Vision client? I would like to disable the print and fullscreen buttons. Further this, is it possible to hide the disabled buttons?
Theoretically, something like this (in a propertyChange
script) might do it:
if event.propertyName == "componentRunning":
from org.icepdf.ri.util import PropertiesManager
props = PropertiesManager.getInstance()
props.setBoolean(PropertiesManager.PROPERTY_SHOW_UTILITY_PRINT, False)
Available keys are documented here:
http://res.icesoft.org/docs/icepdf/latest/viewer/org/icepdf/ri/util/PropertiesManager.html
Yes that worked, it wasn’t at first but that’s because I didn’t realise that you had to have Designer running in ‘preview mode’ and then you have to reload the window before the PDF Viewer is refreshed.
I managed to get hide a few components with:
if event.propertyName == "componentRunning":
from org.icepdf.ri.util import PropertiesManager
props = PropertiesManager.getInstance()
props.setBoolean(PropertiesManager.PROPERTY_SHOW_TOOLBAR_UTILITY, False)
props.setBoolean(PropertiesManager.PROPERTY_SHOW_UTILITY_SEARCH, False)
props.setBoolean(PropertiesManager.PROPERTY_SHOW_UTILITY_PRINT, False)
Result is below, I went through the link you sent me but couldn’t seem to figure out how to remove the ‘Full Screen’ and ‘Show/Hide Form Highlighting’ buttons, I’ve marked them in the image below if anyone else has better luck?