h.put("face", prop.getProperty(key)); } else if (key.equals(Markup.CSS_KEY_FONTSIZE)) { h.put("size", Float.toString(Markup.parseLength(prop .getProperty(key))) + "pt"); float v = Markup.parseLength(prop.getProperty(key)); if (ss.endsWith("%")) { h.put("leading", "0," + (v / 100));
h.put("face", prop.getProperty(key)); } else if (key.equals(Markup.CSS_KEY_FONTSIZE)) { h.put("size", Float.toString(Markup.parseLength(prop .getProperty(key))) + "pt"); float v = Markup.parseLength(prop.getProperty(key)); if (ss.endsWith("%")) { h.put("leading", "0," + (v / 100));
h.put(ElementTags.FACE, prop.getProperty(key)); } else if (key.equals(Markup.CSS_KEY_FONTSIZE)) { float actualFontSize = Markup.parseLength(cprops .getProperty(ElementTags.SIZE), Markup.DEFAULT_FONT_SIZE); if (actualFontSize <= 0f) actualFontSize = Markup.DEFAULT_FONT_SIZE; h.put(ElementTags.SIZE, Float.toString(Markup.parseLength(prop .getProperty(key), actualFontSize)) + "pt"); float actualFontSize = Markup.parseLength(cprops .getProperty(ElementTags.SIZE), Markup.DEFAULT_FONT_SIZE); if (actualFontSize <= 0f) actualFontSize = Markup.DEFAULT_FONT_SIZE; float v = Markup.parseLength(prop.getProperty(key), actualFontSize); if (ss.endsWith("%")) { } else if (key.equals(Markup.CSS_KEY_PADDINGLEFT)) { String ss = prop.getProperty(key).trim().toLowerCase(); h.put("indent", Float.toString(Markup.parseLength(ss)));
h.put("face", prop.getProperty(key)); } else if (key.equals(Markup.CSS_KEY_FONTSIZE)) { h.put("size", Markup.parseLength(prop .getProperty(key)) + "pt"); float v = Markup.parseLength(prop.getProperty(key)); if (ss.endsWith("%")) { h.put("leading", "0," + (v / 100));
h.put(ElementTags.FACE, prop.getProperty(key)); } else if (key.equals(Markup.CSS_KEY_FONTSIZE)) { float actualFontSize = Markup.parseLength(cprops .getProperty(ElementTags.SIZE), Markup.DEFAULT_FONT_SIZE); if (actualFontSize <= 0f) actualFontSize = Markup.DEFAULT_FONT_SIZE; h.put(ElementTags.SIZE, Markup.parseLength(prop .getProperty(key), actualFontSize) + "pt"); float actualFontSize = Markup.parseLength(cprops .getProperty(ElementTags.SIZE), Markup.DEFAULT_FONT_SIZE); if (actualFontSize <= 0f) actualFontSize = Markup.DEFAULT_FONT_SIZE; float v = Markup.parseLength(prop.getProperty(key), actualFontSize); if (ss.endsWith("%")) { } else if (key.equals(Markup.CSS_KEY_PADDINGLEFT)) { String ss = prop.getProperty(key).trim().toLowerCase(); h.put("indent", Float.toString(Markup.parseLength(ss)));
h.put(ElementTags.FACE, prop.getProperty(key)); } else if (key.equals(Markup.CSS_KEY_FONTSIZE)) { float actualFontSize = Markup.parseLength(cprops .getProperty(ElementTags.SIZE), Markup.DEFAULT_FONT_SIZE); if (actualFontSize <= 0f) actualFontSize = Markup.DEFAULT_FONT_SIZE; h.put(ElementTags.SIZE, Float.toString(Markup.parseLength(prop .getProperty(key), actualFontSize)) + "pt"); float actualFontSize = Markup.parseLength(cprops .getProperty(ElementTags.SIZE), Markup.DEFAULT_FONT_SIZE); if (actualFontSize <= 0f) actualFontSize = Markup.DEFAULT_FONT_SIZE; float v = Markup.parseLength(prop.getProperty(key), actualFontSize); if (ss.endsWith("%")) { } else if (key.equals(Markup.CSS_KEY_PADDINGLEFT)) { String ss = prop.getProperty(key).trim().toLowerCase(); h.put("indent", Float.toString(Markup.parseLength(ss)));
size = Markup.parseLength(value); size = Markup.parseLength(value);
size = Markup.parseLength(value); size = Markup.parseLength(value);
size = Markup.parseLength(value); size = Markup.parseLength(value);
/** * Creates a Phrase object based on a list of properties. * @param attributes * @return a Phrase */ public static Phrase getPhrase(Properties attributes) { Phrase phrase = new Phrase(); phrase.setFont(FontFactory.getFont(attributes)); String value; value = attributes.getProperty(ElementTags.LEADING); if (value != null) { phrase.setLeading(Float.parseFloat(value + "f")); } value = attributes.getProperty(Markup.CSS_KEY_LINEHEIGHT); if (value != null) { phrase.setLeading(Markup.parseLength(value, Markup.DEFAULT_FONT_SIZE)); } value = attributes.getProperty(ElementTags.ITEXT); if (value != null) { Chunk chunk = new Chunk(value); if ((value = attributes.getProperty(ElementTags.GENERICTAG)) != null) { chunk.setGenericTag(value); } phrase.add(chunk); } return phrase; }
/** * Creates a Phrase object based on a list of properties. * @param attributes * @return a Phrase */ public static Phrase getPhrase(Properties attributes) { Phrase phrase = new Phrase(); phrase.setFont(FontFactory.getFont(attributes)); String value; value = attributes.getProperty(ElementTags.LEADING); if (value != null) { phrase.setLeading(Float.parseFloat(value + "f")); } value = attributes.getProperty(Markup.CSS_KEY_LINEHEIGHT); if (value != null) { phrase.setLeading(Markup.parseLength(value, Markup.DEFAULT_FONT_SIZE)); } value = attributes.getProperty(ElementTags.ITEXT); if (value != null) { Chunk chunk = new Chunk(value); if ((value = attributes.getProperty(ElementTags.GENERICTAG)) != null) { chunk.setGenericTag(value); } phrase.add(chunk); } return phrase; }
/** * Creates a Phrase object based on a list of properties. * @param attributes * @return a Phrase */ public static Phrase getPhrase(Properties attributes) { Phrase phrase = new Phrase(); phrase.setFont(FontFactory.getFont(attributes)); String value; value = attributes.getProperty(ElementTags.LEADING); if (value != null) { phrase.setLeading(Float.parseFloat(value + "f")); } value = attributes.getProperty(Markup.CSS_KEY_LINEHEIGHT); if (value != null) { phrase.setLeading(Markup.parseLength(value, Markup.DEFAULT_FONT_SIZE)); } value = attributes.getProperty(ElementTags.ITEXT); if (value != null) { Chunk chunk = new Chunk(value); if ((value = attributes.getProperty(ElementTags.GENERICTAG)) != null) { chunk.setGenericTag(value); } phrase.add(chunk); } return phrase; }
float hrWidth = 1; if (width != null) { float tmpWidth = Markup.parseLength(width, Markup.DEFAULT_FONT_SIZE); if (tmpWidth > 0) hrWidth = tmpWidth; if (!width.endsWith("%")) float hrSize = 1; if (size != null) { float tmpSize = Markup.parseLength(size, Markup.DEFAULT_FONT_SIZE); if (tmpSize > 0) hrSize = tmpSize; if (after != null) img.setSpacingAfter(Float.parseFloat(after)); float actualFontSize = Markup.parseLength(cprops .getProperty(ElementTags.SIZE), Markup.DEFAULT_FONT_SIZE); if (actualFontSize <= 0f) actualFontSize = Markup.DEFAULT_FONT_SIZE; float widthInPoints = Markup.parseLength(width, actualFontSize); float heightInPoints = Markup.parseLength(height, actualFontSize); if (widthInPoints > 0 && heightInPoints > 0) {
float hrWidth = 1; if (width != null) { float tmpWidth = Markup.parseLength(width, Markup.DEFAULT_FONT_SIZE); if (tmpWidth > 0) hrWidth = tmpWidth; if (!width.endsWith("%")) float hrSize = 1; if (size != null) { float tmpSize = Markup.parseLength(size, Markup.DEFAULT_FONT_SIZE); if (tmpSize > 0) hrSize = tmpSize; if (after != null) img.setSpacingAfter(Float.parseFloat(after)); float actualFontSize = Markup.parseLength(cprops .getProperty(ElementTags.SIZE), Markup.DEFAULT_FONT_SIZE); if (actualFontSize <= 0f) actualFontSize = Markup.DEFAULT_FONT_SIZE; float widthInPoints = Markup.parseLength(width, actualFontSize); float heightInPoints = Markup.parseLength(height, actualFontSize); if (widthInPoints > 0 && heightInPoints > 0) {
float hrWidth = 1; if (width != null) { float tmpWidth = Markup.parseLength(width, Markup.DEFAULT_FONT_SIZE); if (tmpWidth > 0) hrWidth = tmpWidth; if (!width.endsWith("%")) float hrSize = 1; if (size != null) { float tmpSize = Markup.parseLength(size, Markup.DEFAULT_FONT_SIZE); if (tmpSize > 0) hrSize = tmpSize; if (after != null) img.setSpacingAfter(Float.parseFloat(after)); float actualFontSize = Markup.parseLength(cprops .getProperty(ElementTags.SIZE), Markup.DEFAULT_FONT_SIZE); if (actualFontSize <= 0f) actualFontSize = Markup.DEFAULT_FONT_SIZE; float widthInPoints = Markup.parseLength(width, actualFontSize); float heightInPoints = Markup.parseLength(height, actualFontSize); if (widthInPoints > 0 && heightInPoints > 0) {