try
{file = new File(filePath);}
catch(Exception e)
{throw new RuntimeException(filePath + " file access error.",e);}
Document document = file.getDocument();
// 2. Get the bookmarks collection!
Bookmarks bookmarks = document.getBookmarks();
if(bookmarks == null)
{System.out.println("\nNo bookmark available (Outline dictionary not found).");}
else
{
System.out.println("\nIterating through the bookmarks collection (please wait)...\n");