public void startDocument() { HashMap h = new HashMap(); style.applyStyle("body", h); cprops.addToChain("body", h); }
public Font getFont(ChainedProperties props) { String face = props.getProperty(ElementTags.FACE); if (face != null) { StringTokenizer tok = new StringTokenizer(face, ","); if (props.hasProperty(HtmlTags.I)) style |= Font.ITALIC; if (props.hasProperty(HtmlTags.B)) style |= Font.BOLD; if (props.hasProperty(HtmlTags.U)) style |= Font.UNDERLINE; if (props.hasProperty(HtmlTags.S)) style |= Font.STRIKETHRU; String value = props.getProperty(ElementTags.SIZE); float size = 12; if (value != null) size = Float.parseFloat(value); Color color = Markup.decodeColor(props.getProperty("color")); String encoding = props.getProperty("encoding"); if (encoding == null) encoding = BaseFont.WINANSI;
HashMap prop = new HashMap(); prop.put(follow, null); cprops.addToChain(follow, prop); return; cprops.addToChain(tag, h); if (currentParagraph == null) { currentParagraph = new Paragraph(); cprops.addToChain(tag, h); return; if (src == null) return; cprops.addToChain(tag, h); Image img = null; if (interfaceProps != null) { String path = cprops.getProperty("image_path"); if (path == null) path = ""; String width = (String) h.get("width"); String height = (String) h.get("height"); String before = cprops.getProperty("before"); String after = cprops.getProperty("after"); if (before != null) img.setSpacingBefore(Float.parseFloat(before));
String follow = (String) FactoryProperties.followTags.get(tag); if (follow != null) { cprops.removeChain(follow); return; cprops.removeChain(tag); return; String href = cprops.getProperty("href"); if (href != null) { ArrayList chunks = currentParagraph.getChunks(); tmp.add(tmp2); currentParagraph = tmp; cprops.removeChain("a"); return; endElement(HtmlTags.LISTITEM); skipText = false; cprops.removeChain(tag); if (stack.empty()) return; pendingLI = false; skipText = true; cprops.removeChain(tag); if (stack.empty()) return;
/** * Gets a HyphenationEvent based on the hyphenation entry in ChainedProperties. * @param props ChainedProperties * @return a HyphenationEvent * @since 2.1.2 */ public static HyphenationEvent getHyphenation(ChainedProperties props) { return getHyphenation(props.getProperty("hyphenation")); }
public static Chunk createChunk(String text, ChainedProperties props) { Chunk ck = new Chunk(text, getFont(props)); if (props.hasProperty("sub")) ck.setTextRise(-6); else if (props.hasProperty("sup")) ck.setTextRise(6); return ck; }
HashMap prop = new HashMap(); prop.put(follow, null); cprops.addToChain(follow, prop); return; cprops.addToChain(tag, h); if (currentParagraph == null) { currentParagraph = new Paragraph(); cprops.addToChain(tag, h); return; if (src == null) return; cprops.addToChain(tag, h); Image img = null; if (interfaceProps != null) { String path = cprops.getProperty("image_path"); if (path == null) path = ""; String width = (String) h.get("width"); String height = (String) h.get("height"); String before = cprops.getProperty("before"); String after = cprops.getProperty("after"); if (before != null) img.setSpacingBefore(Float.parseFloat(before));
String follow = (String)CJKFactoryProperties.followTags.get(tag); if (follow != null) { cprops.removeChain(follow); return; cprops.removeChain(tag); return; String href = cprops.getProperty("href"); if (currentParagraph == null) currentParagraph = new Paragraph(); tmp.add(tmp2); currentParagraph = tmp; cprops.removeChain("a"); return; endElement("li"); skipText = false; cprops.removeChain(tag); if (stack.empty()) return; pendingLI = false; skipText = true; cprops.removeChain(tag); if (stack.empty()) return;
/** * Gets a HyphenationEvent based on the hyphenation entry in ChainedProperties. * @param props ChainedProperties * @return a HyphenationEvent * @since 2.1.2 */ public static HyphenationEvent getHyphenation(ChainedProperties props) { return getHyphenation(props.getProperty("hyphenation")); }
public Chunk createChunk(String text, ChainedProperties props) { Font font = getFont(props); float size = font.getSize(); size /= 2; Chunk ck = new Chunk(text, font); if (props.hasProperty("sub")) ck.setTextRise(-size); else if (props.hasProperty("sup")) ck.setTextRise(size); ck.setHyphenation(getHyphenation(props)); return ck; }
HashMap prop = new HashMap(); prop.put(follow, null); cprops.addToChain(follow, prop); return; cprops.addToChain(tag, h); if (currentParagraph == null) { currentParagraph = new Paragraph(); cprops.addToChain(tag, h); return; if (src == null) return; cprops.addToChain(tag, h); Image img = null; if (interfaceProps != null) { String path = cprops.getProperty("image_path"); if (path == null) path = ""; String width = (String) h.get("width"); String height = (String) h.get("height"); String before = cprops.getProperty("before"); String after = cprops.getProperty("after"); if (before != null) img.setSpacingBefore(Float.parseFloat(before));
public Font getFont(ChainedProperties props) { String face = props.getProperty(ElementTags.FACE); if (face != null) { StringTokenizer tok = new StringTokenizer(face, ","); if (props.hasProperty(HtmlTags.I)) style |= Font.ITALIC; if (props.hasProperty(HtmlTags.B)) style |= Font.BOLD; if (props.hasProperty(HtmlTags.U)) style |= Font.UNDERLINE; if (props.hasProperty(HtmlTags.S)) style |= Font.STRIKETHRU; String value = props.getProperty(ElementTags.SIZE); float size = 12; if (value != null) size = Float.parseFloat(value); Color color = Markup.decodeColor(props.getProperty("color")); String encoding = props.getProperty("encoding"); if (encoding == null) encoding = BaseFont.WINANSI;
String follow = (String) FactoryProperties.followTags.get(tag); if (follow != null) { cprops.removeChain(follow); return; cprops.removeChain(tag); return; String href = cprops.getProperty("href"); if (href != null) { ArrayList chunks = currentParagraph.getChunks(); tmp.add(tmp2); currentParagraph = tmp; cprops.removeChain("a"); return; endElement(HtmlTags.LISTITEM); skipText = false; cprops.removeChain(tag); if (stack.empty()) return; pendingLI = false; skipText = true; cprops.removeChain(tag); if (stack.empty()) return;
/** * Gets a HyphenationEvent based on the hyphenation entry in ChainedProperties. * @param props ChainedProperties * @return a HyphenationEvent * @since 2.1.2 */ public static HyphenationEvent getHyphenation(ChainedProperties props) { return getHyphenation(props.getProperty("hyphenation")); }
public Chunk createChunk(String text, ChainedProperties props) { Font font = getFont(props); float size = font.getSize(); size /= 2; Chunk ck = new Chunk(text, font); if (props.hasProperty("sub")) ck.setTextRise(-size); else if (props.hasProperty("sup")) ck.setTextRise(size); ck.setHyphenation(getHyphenation(props)); return ck; }
public void startDocument() { HashMap h = new HashMap(); style.applyStyle("body", h); cprops.addToChain("body", h); }
public static Font getFont(ChainedProperties props) { String face = props.getProperty("face"); if (face != null) { StringTokenizer tok = new StringTokenizer(face, ","); if (props.hasProperty("i")) style |= Font.ITALIC; if (props.hasProperty("b")) style |= Font.BOLD; if (props.hasProperty("u")) style |= Font.UNDERLINE; String value = props.getProperty("size"); float size = 12; if (value != null) size = Float.valueOf(value).floatValue(); Color color = decodeColor(props.getProperty("color")); String encoding = props.getProperty("cjk_encoding"); String embededstr = props.getProperty("cjk_embeded"); if(encoding == null || encoding.equals("")) encoding = BaseFont.WINANSI;
String follow = (String) FactoryProperties.followTags.get(tag); if (follow != null) { cprops.removeChain(follow); return; cprops.removeChain(tag); return; String href = cprops.getProperty("href"); if (href != null) { ArrayList chunks = currentParagraph.getChunks(); tmp.add(tmp2); currentParagraph = tmp; cprops.removeChain("a"); return; endElement(HtmlTags.LISTITEM); skipText = false; cprops.removeChain(tag); if (stack.empty()) return; pendingLI = false; skipText = true; cprops.removeChain(tag); if (stack.empty()) return;
int s = 0; if (value.startsWith("+") || value.startsWith("-")) { String old = getProperty("basefontsize"); if (old == null) old = "12";
public Chunk createChunk(String text, ChainedProperties props) { Font font = getFont(props); float size = font.getSize(); size /= 2; Chunk ck = new Chunk(text, font); if (props.hasProperty("sub")) ck.setTextRise(-size); else if (props.hasProperty("sup")) ck.setTextRise(size); ck.setHyphenation(getHyphenation(props)); return ck; }