Package com.plainsource.commons.text.template

Examples of com.plainsource.commons.text.template.HtmlTemplate


    public static Template createDefaultTemplate(OutputFormat outputFormat, File templateFile) throws IOException {
        switch (outputFormat) {
            case TEX:
                return new TexTemplate(templateFile);
            case HTML:
                return new HtmlTemplate(templateFile);
            case PDF:
                return null; // No template is used for PDF output
            default:
                throw new IllegalArgumentException(String.format("No support for '%s' format. Supported template " +
                        "based formats are: TEX and HTML formats." +
View Full Code Here


    public static Template createDefaultTeXTemplate() throws IOException {
        return new TexTemplate(Template.class.getClassLoader().getResourceAsStream("templates/invoice.tex"));
    }

    public static Template createDefaultHTMLTemplate() throws IOException {
        return new HtmlTemplate(Template.class.getClassLoader().getResourceAsStream("templates/invoice.html"));
    }
View Full Code Here

    }


    @Override
    public Template createTemplate(File file) throws IOException {
        return new HtmlTemplate(file);
    }
View Full Code Here

        return new HtmlTemplate(file);
    }

    @Override
    public Template createTemplate(InputStream is) throws IOException {
        return new HtmlTemplate(is);
    }
View Full Code Here

TOP

Related Classes of com.plainsource.commons.text.template.HtmlTemplate

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.