Example usage for com.itextpdf.text.html.simpleparser StyleSheet resolveStyleAttribute

List of usage examples for com.itextpdf.text.html.simpleparser StyleSheet resolveStyleAttribute

Introduction

In this page you can find the example usage for com.itextpdf.text.html.simpleparser StyleSheet resolveStyleAttribute.

Prototype

public static void resolveStyleAttribute(Map<String, String> h, ChainedProperties chain) 

Source Link

Document

Method contributed by Lubos Strapko

Usage

From source file:com.masscustsoft.service.ToPdf.java

License:Open Source License

/**
 * @see com.itextpdf.text.xml.simpleparser.SimpleXMLDocHandler#startElement(java.lang.String, java.util.Map)
 *//*  www. j  a  v  a  2s. c om*/
public void startElement(final String tag, final Map<String, String> attrs) {
    HTMLTagProcessor htmlTag = tags.get(tag);
    if (htmlTag == null) {
        return;
    }
    // apply the styles to attrs
    style.applyStyle(tag, attrs);
    // deal with the style attribute
    StyleSheet.resolveStyleAttribute(attrs, chain);
    // process the tag
    try {
        htmlTag.startElement(this, tag, attrs);
    } catch (DocumentException e) {
        throw new ExceptionConverter(e);
    } catch (IOException e) {
        throw new ExceptionConverter(e);
    }
}