public void calculatePageImageSize() {
        synchronized (documentLock) {
            if (document != null && document.getCatalog() != null) {
                pageSize = document.getPageDimension(pageCursor - 1, rotation, zoom);
            } else {
                pageSize = new PDimension(1f, 1f);
            }
        }
    }