Skip to content
This repository has been archived by the owner on Aug 15, 2021. It is now read-only.

Additional features

Dansoftowner edited this page Feb 15, 2020 · 4 revisions

In this page we talk about additional features in this library.

Visibility of secondaryToolbarToggle

The button which has the 'secondaryToolbarToggle' id, is this button:

secondaryToolbarToggle 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: secondaryToolbarToggle button is unvisible

Set the visibility of any element which has id

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: sidebarToggle 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: sidebarToggle is unvisible

Navigate by page

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.