public boolean havePermissionToPrint() {
        if (document == null)
            return false;
        org.icepdf.core.pobjects.security.SecurityManager securityManager =
                document.getSecurityManager();
        if (securityManager == null)
            return true;
        Permissions permissions = securityManager.getPermissions();
        return permissions == null ||
                permissions.getPermissions(Permissions.PRINT_DOCUMENT);
    }