getSharedContext().setMaxWidth(0);
    protected LayoutContext newLayoutContext(PageInfo pageInfo, Graphics2D g) {        XRLog.layout(Level.FINEST, "new context begin");        getSharedContext().setCanvas(this);        Rectangle extents;        extents = getBaseExtents(pageInfo);        //Uu.p("newContext() = extents = " + extents);        getSharedContext().setMaxWidth(0);        //getSharedContext().setMaxHeight(0);        XRLog.layout(Level.FINEST, "new context end");        //Uu.p("new context with extents: " + extents);        LayoutContext result = getSharedContext().newLayoutContextInstance(extents);        result.setGraphics(g.getDeviceConfiguration().createCompatibleImage(1, 1).createGraphics());        result.setPrint(pageInfo != null);        result.setInteractive(pageInfo == null);        return result;    }