private PagePosition calcPDFPagePosition(CssContext c, String id, Box box) { PageBox page = _root.getLayer().getLastPage(c, box); if (page == null) { return null; } float x = box.getAbsX() + page.getMarginBorderPadding(c, CalculatedStyle.LEFT); float y = (page.getBottom() - (box.getAbsY() + box.getHeight())) + page.getMarginBorderPadding(c, CalculatedStyle.BOTTOM); x /= _dotsPerPoint; y /= _dotsPerPoint; PagePosition result = new PagePosition(); result.setId(id); result.setPageNo(page.getPageNo()); result.setX(x); result.setY(y); result.setWidth(box.getEffectiveWidth() / _dotsPerPoint); result.setHeight(box.getHeight() / _dotsPerPoint); return result; } }
private PagePosition calcPDFPagePosition(CssContext c, String id, Box box) { PageBox page = _root.getLayer().getLastPage(c, box); if (page == null) { return null; } float x = box.getAbsX() + page.getMarginBorderPadding(c, CalculatedStyle.LEFT); float y = (page.getBottom() - (box.getAbsY() + box.getHeight())) + page.getMarginBorderPadding(c, CalculatedStyle.BOTTOM); x /= _dotsPerPoint; y /= _dotsPerPoint; PagePosition result = new PagePosition(); result.setId(id); result.setPageNo(page.getPageNo()); result.setX(x); result.setY(y); result.setWidth(box.getEffectiveWidth() / _dotsPerPoint); result.setHeight(box.getHeight() / _dotsPerPoint); return result; } }
private PagePosition calcPDFPagePosition(CssContext c, String id, Box box) { PageBox page = _root.getLayer().getLastPage(c, box); if (page == null) { return null; } float x = box.getAbsX() + page.getMarginBorderPadding(c, CalculatedStyle.LEFT); float y = (page.getBottom() - (box.getAbsY() + box.getHeight())) + page.getMarginBorderPadding(c, CalculatedStyle.BOTTOM); x /= _dotsPerPoint; y /= _dotsPerPoint; PagePosition result = new PagePosition(); result.setId(id); result.setPageNo(page.getPageNo()); result.setX(x); result.setY(y); result.setWidth(box.getEffectiveWidth() / _dotsPerPoint); result.setHeight(box.getHeight() / _dotsPerPoint); return result; } }
private PagePosition calcPDFPagePosition(CssContext c, String id, Box box) { PageBox page = _root.getLayer().getLastPage(c, box); if (page == null) { return null; } float x = box.getAbsX() + page.getMarginBorderPadding(c, CalculatedStyle.LEFT); float y = (page.getBottom() - (box.getAbsY() + box.getHeight())) + page.getMarginBorderPadding(c, CalculatedStyle.BOTTOM); x /= _dotsPerPoint; y /= _dotsPerPoint; PagePosition result = new PagePosition(); result.setId(id); result.setPageNo(page.getPageNo()); result.setX(x); result.setY(y); result.setWidth(box.getEffectiveWidth() / _dotsPerPoint); result.setHeight(box.getHeight() / _dotsPerPoint); return result; } }
private PagePosition calcPDFPagePosition(CssContext c, String id, Box box) { PageBox page = _root.getLayer().getLastPage(c, box); if (page == null) { return null; } float x = box.getAbsX() + page.getMarginBorderPadding(c, CalculatedStyle.LEFT); float y = (page.getBottom() - (box.getAbsY() + box.getHeight())) + page.getMarginBorderPadding(c, CalculatedStyle.BOTTOM); x /= _dotsPerPoint; y /= _dotsPerPoint; PagePosition result = new PagePosition(); result.setId(id); result.setPageNo(page.getPageNo()); result.setX(x); result.setY(y); result.setWidth(box.getEffectiveWidth() / _dotsPerPoint); result.setHeight(box.getHeight() / _dotsPerPoint); return result; } }