Class HtmlExporterNG2

java.lang.Object
org.docx4j.convert.out.html.AbstractHtmlExporter
org.docx4j.convert.out.html.HtmlExporterNG2
All Implemented Interfaces:
Output

public class HtmlExporterNG2 extends AbstractHtmlExporter
Deprecated.
HtmlExporterNG (now removed - see http://dev.plutext.org/trac/docx4j/browser/trunk/docx4j/src/main/java/org/docx4j/convert/out/html/HtmlExporterNG.java?rev=1238 ) had 2 salient features: 1. CSS .xx_pPr and .xx_rPr are created / split out for each docx paragraph style 2. Each docx style is resolved into its effective style, by the PropertyResolver When roundtripping HTML content, this had adverse consequences (neither too bad, but adding to our work): (a) It is harder to tell what has been added to the style definition in an editor (if/when that is possible) (b) Have to convert .xx_pPr and .xx_rPr back to xx Also, we're not really taking advantage of the ability of CSS to cascade. So this HtmlExporterNG2 takes a different approach. It creates a css definition for each style in use (either directly or indirectly), and in the document, on the element's class attribute, puts the set of style names in the hierarchy into . The CSS rules are written in a depth or breadth first traversal of the style graph, so that conflicts are handled correctly. TODO: handle document defaults.
Author:
jason
  • Field Details

    • DEFAULT_OUTPUT_SIZE

      protected static final int DEFAULT_OUTPUT_SIZE
      Deprecated.
      See Also:
    • log

      protected static org.slf4j.Logger log
      Deprecated.
  • Constructor Details

    • HtmlExporterNG2

      public HtmlExporterNG2()
      Deprecated.
  • Method Details

    • setWmlPackage

      public void setWmlPackage(WordprocessingMLPackage wmlPackage)
      Deprecated.
    • setHtmlSettings

      public void setHtmlSettings(HTMLSettings htmlSettings)
      Deprecated.
    • setXslt

      public static void setXslt(Templates xslt)
      Deprecated.
      org/docx4j/convert/out/html/docx2xhtmlNG2.xslt will be used by default to transform the docx to html. This method allows you to use your own xslt instead.
      Parameters:
      xslt -
    • output

      public void output(Result result) throws Docx4JException
      Deprecated.
      Throws:
      Docx4JException
    • html

      public void html(WordprocessingMLPackage wmlPackage, Result result, HTMLSettings htmlSettings) throws Exception
      Deprecated.
      Create an html version of the document.
      Specified by:
      html in class AbstractHtmlExporter
      Parameters:
      result - The javax.xml.transform.Result object to transform into
      Throws:
      Exception