if (url != null) {
float w = width == null ? 0 : (float)width.getValue(Unit.PT);
float h = height == null ? 0 : (float)height.getValue(Unit.PT);
float orgx = (float)originX.getValue(Unit.PT);
float orgy = (float)originY.getValue(Unit.PT);
attr = new ImageAttribute(url, alignment,
w, h, orgx, orgy);
}
}
if (attr != null) {
builder.setAttribute(TextAttribute.CHAR_REPLACEMENT, attr);