Ignore:
Timestamp:
02/23/10 06:32:26 (2 years ago)
Author:
jharrop
Message:

Support for WMF (but not EMF, yet) as SVG in HTML output.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/docx4j/src/main/java/org/docx4j/samples/CreateHtml.java

    r1044 r1078  
    2121package org.docx4j.samples; 
    2222 
    23 import java.io.FileInputStream; 
    2423import java.io.OutputStream; 
    25  
    26 import javax.xml.bind.JAXBContext; 
    27 import javax.xml.bind.JAXBElement; 
    28 import javax.xml.bind.Unmarshaller; 
    2924 
    3025import org.docx4j.convert.out.html.AbstractHtmlExporter; 
    3126import org.docx4j.convert.out.html.HtmlExporter; 
    32 import org.docx4j.convert.out.html.HtmlExporterNG; 
    3327import org.docx4j.convert.out.html.HtmlExporterNG2; 
    34 import org.docx4j.jaxb.Context; 
    3528import org.docx4j.openpackaging.packages.WordprocessingMLPackage; 
    36 import org.docx4j.openpackaging.parts.WordprocessingML.MainDocumentPart; 
    3729 
     30/** 
     31 * If the source docx contained a WMF, that 
     32 * will get converted to inline SVG.  In order 
     33 * to see the SVG in your browser, you'll need  
     34 * to rename the file to .xml or serve 
     35 * it with MIME type application/xhtml+xml 
     36 * 
     37 */ 
    3838public class CreateHtml { 
    3939             
     
    4444                boolean useHtmlExporterNG = true; 
    4545 
     46                        String inputfilepath = System.getProperty("user.dir") + "/tmp/wmf.docx"; 
     47                 
    4648//              String inputfilepath = System.getProperty("user.dir") + "/sample-docs/sample-docx.xml";          
    47                 String inputfilepath = System.getProperty("user.dir") + "/docs/Docx4j_GettingStarted.xml";               
     49//              String inputfilepath = System.getProperty("user.dir") + "/docs/Docx4j_GettingStarted.xml";               
    4850//              String inputfilepath = System.getProperty("user.dir")  
    4951//              + "/sample-docs/test-docs/endnotes.xml";                 
Note: See TracChangeset for help on using the changeset viewer.