Dimension dim = root.getLayer().getPaintingDimension(c); root.getLayer().trimEmptyPages(c, dim.height);
    public void layout() {        LayoutContext c = newLayoutContext();        BlockBox root = Boxing.constructBox(c, new DomToplevelNode(_doc));        Boxing.layout(c, root, new DomToplevelNode(_doc));        _root = root;    }