dbarra / xdocreport

Automatically exported from code.google.com/p/xdocreport
1 stars 0 forks source link

Give the capability to configure SAX ContentHandler of POI XHTML converter #327

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Give the capability to configure SAX ContentHandler of POI XHTML converter like 
this : 

1) Create a SAX Handler factory  

---------------------------------------------------------
public class MyContentHandlerFactory
    implements IContentHandlerFactory
{

    public static final IContentHandlerFactory INSTANCE = new MyContentHandlerFactory();

    public ContentHandler create( OutputStream out, Writer writer, XHTMLOptions options )
    {

        return out != null ? new SimpleContentHandler( out, options.getIndent() )
                        : new SimpleContentHandler( writer, options.getIndent() );
    }
}
---------------------------------------------------------

Use this factory like this : 

---------------------------------------------------------
XHTMLOptions.create().setContentHandlerFactory(MyContentHandlerFactory.INSTANCE)
;
---------------------------------------------------------

Original issue reported on code.google.com by angelo.z...@gmail.com on 14 Nov 2013 at 1:32

GoogleCodeExporter commented 8 years ago
Done for 1.0.4. See Git commit at 
https://code.google.com/p/xdocreport/source/detail?r=2bd3a1aa929704dfff93f061bb9
307f9270f1f2c

Original comment by angelo.z...@gmail.com on 14 Nov 2013 at 1:34

GoogleCodeExporter commented 8 years ago
cleanup

Original comment by pascal.leclercq on 10 Oct 2014 at 7:37