JPedal includes a number of custom interfaces that can be implemented in Java by users to access low-level features in JPedal.
A PDF page consists of a series of commands defining its content. Between each command, we call an instance of ErrorTracker (if present) and this is able to stop decoding.ErrorTracker allows you to track the decoding or add a timeout.
This will not be instantaneous (a command may take some time to complete), but it does provide a low impact and clean way to exit decoding a page should you wish.
The way to use this feature is to pass in an instance of ErrorTracker. Here is an example of source code showing how to create and pass in an ErrorTracker.