Ignore:
Timestamp:
03/10/08 04:34:14 (4 years ago)
Author:
jharrop
Message:

Sketch out using font-family cascade for HTML output. Not implemented in populateFontMappings yet, though.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/docx4j/src/main/java/org/docx4j/openpackaging/packages/WordprocessingMLPackage.java

    r159 r163  
    166166         
    167167 
    168         /** Create an html version of the document.  
     168        /** Create an html version of the document, using CSS font family 
     169         *  stacks.  This is appropriate if the HTML is intended for 
     170         *  viewing in a web browser, rather than an intermediate step 
     171         *  on the way to generating PDF output.  
    169172         *  
    170173         * @param result 
     
    173176         * */  
    174177    public void html(javax.xml.transform.Result result) throws Exception { 
     178 
     179        html(result, true); 
     180    } 
     181     
     182        /** Create an html version of the document.  
     183         *  
     184         * @param result 
     185         *            The javax.xml.transform.Result object to transform into  
     186         *  
     187         * */  
     188    public void html(javax.xml.transform.Result result, boolean fontFamilyStack) throws Exception { 
    175189         
    176190        /* 
     
    264278                //     possibly via an extension function in the XSLT 
    265279                xformer.setParameter("substituterInstance", s); 
     280                xformer.setParameter("fontFamilyStack", fontFamilyStack); 
    266281                 
    267282                 
     
    308323                org.w3c.dom.Document xhtmlDoc = org.docx4j.XmlUtils.neww3cDomDocument(); 
    309324                javax.xml.transform.dom.DOMResult result = new javax.xml.transform.dom.DOMResult(xhtmlDoc); 
    310                 html(result); 
     325                html(result, false); // false -> don't use HTML fonts. 
    311326                                 
    312327                // Now render the XHTML 
Note: See TracChangeset for help on using the changeset viewer.