if (preferredSize != null) {
if (preferredSize != null && (preferredSize.isWidthDefined() || preferredSize.isHeightDefined())) {
    public static void printCSSInlinePreferredSize(Device device, SDimension preferredSize) throws IOException {        if (preferredSize != null) {            device.print(" style=\"");            if (preferredSize.isWidthDefined())                device.print("width:").print(preferredSize.getWidth()).print(";");            if (preferredSize.isHeightDefined())                device.print("height:").print(preferredSize.getHeight()).print(";");            device.print("\"");        }    }