*/
    public Catalog getRootCatalog() {
        Object tmp = library.getObject(entries, "Root");
        // specification states the the root entry must be a indirect
        if (tmp instanceof Catalog) {
            return (Catalog) library.getObject(entries, "Root");
        }
        // there are however a few instances where the dictionary is specified
        // directly
        else if (tmp instanceof Hashtable) {
            return new Catalog(library, (Hashtable) tmp);
        }
        // if no root was found we return so that the use will be notified
        // of the problem which is the PDF can not be loaded.
        else {
            return null;
        }
    }