Package net.sourceforge.rtf

Examples of net.sourceforge.rtf.IRTFDocumentParser


            RTFTemplateBuilder builder = RTFTemplateBuilder.newRTFTemplateBuilder();
           
            /**
             * 2. Get RTF parser
             */
            IRTFDocumentParser parser = builder.newRTFDocumentParser();
           
            /**
             * 3. Get RTF Document of the rtf source model
             */
            String rtfSourceModel = "test.rtf";
            InputStream inputStream = TestFreemarkerTransformer.class.getResourceAsStream(rtfSourceModel);
            parser.parse(inputStream);
            RTFDocument document = parser.getRTFDocument();
           
            /**
             * 4. Prepare RTF context fields
             * => set the field which must be transformed
             * In test.rtf, there is a mergefield called "date"
View Full Code Here


     * @return
     * @throws UnsupportedRTFDocumentParser
     */
    public IRTFDocumentParser newRTFDocumentParser(String rtfDocumentParserType)
        throws UnsupportedRTFDocumentParser {
        IRTFDocumentParser rtfDocumentParser = (IRTFDocumentParser)
                applicationContext.getBean(rtfDocumentParserType);
        if (rtfDocumentParser == null)
            throw new UnsupportedRTFDocumentParser(rtfDocumentParserType);
        return rtfDocumentParser;
    }     
View Full Code Here

            RTFTemplateBuilder builder = RTFTemplateBuilder.newRTFTemplateBuilder();
           
            /**
             * 2. Get RTF parser
             */
            IRTFDocumentParser parser = builder.newRTFDocumentParser();
           
            /**
             * 3. Get RTF Document of the rtf source model
             */
            String rtfSourceModel = "test.rtf";
            InputStream inputStream = TestFreemarkerTransformer.class.getResourceAsStream(rtfSourceModel);
            parser.parse(inputStream);
            RTFDocument document = parser.getRTFDocument();
           
            /**
             * 4. Prepare RTF context fields
             * => set the field which must be transformed
             * In test.rtf, there is a mergefield called "date"
View Full Code Here

TOP

Related Classes of net.sourceforge.rtf.IRTFDocumentParser

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.