Package com.adobe.dp.epub.style

Examples of com.adobe.dp.epub.style.EPUBCSSURLFactory


      element.setClassName(className);
    String styleStr = attributes.getValue("style");
    InlineRule style = null;
    if (styleStr != null) {
      CSSParser parser = new CSSParser();
      parser.setCSSURLFactory(new EPUBCSSURLFactory(document.resource));
      style = parser.readInlineStyle(styleStr);
    }
    if (element instanceof ImageElement) {
      ImageElement imageElement = (ImageElement) element;
      String src = attributes.getValue("src");
View Full Code Here


  public void endElement(String uri, String localName, String name) throws SAXException {
    String content = flushText();
    if (uri.equals(OPSDocument.xhtmlns)) {
      if (localName.equals("style")) {
        CSSParser parser = new CSSParser();
        parser.setCSSURLFactory(new EPUBCSSURLFactory(document.resource));
        try {
          CSSStylesheet css = parser.readStylesheet(new StringReader(content));
          String inlineName = PathUtil.resolveRelativeReference(document.resource.getName(), "inline.css");
          StyleResource sr = epub.createStyleResource(inlineName);
          sr.setCSS(css);
View Full Code Here

    pout.close();
  }
 
  public void load(DataSource data) throws IOException {
    CSSParser parser = new CSSParser();
    parser.setCSSURLFactory(new EPUBCSSURLFactory(this));
    CSSStylesheet css = parser.readStylesheet(data.getInputStream());
    stylesheet = new Stylesheet(this, css);
  }
View Full Code Here

TOP

Related Classes of com.adobe.dp.epub.style.EPUBCSSURLFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.