-
Notifications
You must be signed in to change notification settings - Fork 24
Additional features
In this page we talk about additional features in this library.
The button which has the 'secondaryToolbarToggle' id, is this button:
You can easily set the visibility of this element:
PDFDisplayer displayer = new PDFDisplayer();
displayer.setSecondaryToolbarToggleVisibility(false); //you pass false if you want to hide it, true if you want to make it visible
This will produce this result:
If you want to set the visibility of an element by it's id you can use the setVisibilityOf(String id, boolean val)
method.
For example this button: has the id called 'sidebarToggle' so you can set the visibility of this element this way:
PDFDisplayer displayer = new PDFDisplayer();
displayer.setVisibilityOf("sidebarToggle", false);
It will hide the sidebarToggle button:
You can navigate to a page of a pdf from java code with the method called navigateByPage(int pageNum)
.
This method may not work sometimes because maybe the pdf document is not loaded yet when you call this method.
If you use this method for example from a button's event handler it may work.