Project project = new Project( "XDocReport" ); context.put( "project", project ); developers.add( new Developer( "ZERR", "Angelo", "angelo.zerr@gmail.com" ).addRole( new Role( "Architecte" ) ).addRole( new Role( "Developer" ) ) ); developers.add( new Developer( "Leclercq", "Pascal", "pascal.leclercq@gmail.com" ).addRole( new Role( "Architecte" ) ).addRole( new Role( "Developer" ) ) ); developers.add( new Developer( "Bousta", "Amine", "" ).addRole( new Role( "Developer" ) ) ); context.put( "developers", developers );
public static void main( String[] args ) { try { // 1) Load Docx file by filling Velocity template engine and cache // it to the registry InputStream in = DocxProjectWithVelocity.class.getResourceAsStream( "DocxProjectWithVelocity.docx" ); IXDocReport report = XDocReportRegistry.getRegistry().loadReport( in, TemplateEngineKind.Velocity ); // 2) Create context Java model IContext context = report.createContext(); Project project = new Project( "XDocReport" ); context.put( "project", project ); // 3) Generate report by merging Java model with the Docx OutputStream out = new FileOutputStream( new File( "DocxProjectWithVelocity_Out.docx" ) ); report.process( context, out ); } catch ( IOException e ) { e.printStackTrace(); } catch ( XDocReportException e ) { e.printStackTrace(); } } }
Project project = new Project( "XDocReport" ); project.setURL( "http://code.google.com/p/xdocreport/" ); context.put( "project", project ); IImageProvider logo = new ClassPathImageProvider( DocxProjectWithVelocityAndImageList.class, "logo.png" ); developers.add( new DeveloperWithImage( "ZERR", "Angelo", DocxProjectWithVelocityAndImageList.class, "AngeloZERR.jpg" ) ) ); developers.add( new DeveloperWithImage( "Leclercq", "Pascal",
Project project = new Project("XDocReport"); context.put("project", project); developers.add(new Developer("ZERR", "Angelo", "angelo.zerr@gmail.com").addRole(new Role("Architecte")) .addRole(new Role("Developer"))); developers.add(new Developer("Leclercq", "Pascal", "pascal.leclercq@gmail.com") .addRole(new Role("Architecte")).addRole( new Role("Developer"))); developers.add(new Developer("Bousta", "Amine", "") .addRole(new Role("Developer"))); context.put("developers", developers);
public static void main(String[] args) { try { // 1) Load Docx file by filling Velocity template engine and cache // it to the registry InputStream in = DocxProjectWithVelocity2XHTML.class .getResourceAsStream("DocxProjectWithVelocity.docx"); IXDocReport report = XDocReportRegistry.getRegistry().loadReport( in, TemplateEngineKind.Velocity); // 2) Create context Java model IContext context = report.createContext(); Project project = new Project("XDocReport"); context.put("project", project); // 3) Generate report by merging Java model with the Docx OutputStream out = new FileOutputStream(new File( "DocxProjectWithVelocity_Out.html")); // report.process(context, out); Options options = Options.getTo(ConverterTypeTo.XHTML).via( ConverterTypeVia.XWPF); report.convert(context, options, out); } catch (IOException e) { e.printStackTrace(); } catch (XDocReportException e) { e.printStackTrace(); } } }
Project project = new Project("XDocReport"); context.put("project", project); developers.add(new Developer("ZERR", "Angelo", "angelo.zerr@gmail.com").addRole(new Role("Architecte")) .addRole(new Role("Developer"))); developers.add(new Developer("Leclercq", "Pascal", "pascal.leclercq@gmail.com") .addRole(new Role("Architecte")).addRole( new Role("Developer"))); developers.add(new Developer("Bousta", "Amine", "") .addRole(new Role("Developer"))); context.put("developers", developers);
public static void main(String[] args) { try { // 1) Load Docx file by filling Velocity template engine and cache // it to the registry InputStream in = DocxProjectWithVelocity2PDF.class .getResourceAsStream("DocxProjectWithVelocity.docx"); IXDocReport report = XDocReportRegistry.getRegistry().loadReport( in, TemplateEngineKind.Velocity); // 2) Create context Java model IContext context = report.createContext(); Project project = new Project("XDocReport"); context.put("project", project); // 3) Generate report by merging Java model with the Docx OutputStream out = new FileOutputStream(new File( "DocxProjectWithVelocity_Out.pdf")); // report.process(context, out); Options options = Options.getTo(ConverterTypeTo.PDF).via( ConverterTypeVia.XWPF); report.convert(context, options, out); } catch (IOException e) { e.printStackTrace(); } catch (XDocReportException e) { e.printStackTrace(); } } }
Project project = new Project("XDocReport"); context.put("project", project); developers.add(new Developer("ZERR", "Angelo", "angelo.zerr@gmail.com").addRole(new Role("Architecte")) .addRole(new Role("Developer"))); developers.add(new Developer("Leclercq", "Pascal", "pascal.leclercq@gmail.com") .addRole(new Role("Architecte")).addRole( new Role("Developer"))); developers.add(new Developer("Bousta", "Amine", "") .addRole(new Role("Developer"))); context.put("developers", developers);
public static void main(String[] args) { try { // 1) Load Docx file by filling Velocity template engine and cache // it to the registry InputStream in = DocxProjectWithVelocity2XHTML.class .getResourceAsStream("DocxProjectWithVelocity.docx"); IXDocReport report = XDocReportRegistry.getRegistry().loadReport( in, TemplateEngineKind.Velocity); // 2) Create context Java model IContext context = report.createContext(); Project project = new Project("XDocReport"); context.put("project", project); // 3) Generate report by merging Java model with the Docx OutputStream out = new FileOutputStream(new File( "DocxProjectWithVelocity_Out.html")); // report.process(context, out); Options options = Options.getTo(ConverterTypeTo.XHTML).via( ConverterTypeVia.XWPF); report.convert(context, options, out); } catch (IOException e) { e.printStackTrace(); } catch (XDocReportException e) { e.printStackTrace(); } } }
Project project = new Project("XDocReport"); context.put("project", project); developers.add(new Developer("ZERR", "Angelo", "angelo.zerr@gmail.com").addRole(new Role("Architecte")) .addRole(new Role("Developer"))); developers.add(new Developer("Leclercq", "Pascal", "pascal.leclercq@gmail.com") .addRole(new Role("Architecte")).addRole( new Role("Developer"))); developers.add(new Developer("Bousta", "Amine", "") .addRole(new Role("Developer"))); context.put("developers", developers);
public static void main(String[] args) { try { // 1) Load Docx file by filling Velocity template engine and cache // it to the registry InputStream in = DocxProjectWithVelocity2PDF.class .getResourceAsStream("DocxProjectWithVelocity.docx"); IXDocReport report = XDocReportRegistry.getRegistry().loadReport( in, TemplateEngineKind.Velocity); // 2) Create context Java model IContext context = report.createContext(); Project project = new Project("XDocReport"); context.put("project", project); // 3) Generate report by merging Java model with the Docx OutputStream out = new FileOutputStream(new File( "DocxProjectWithVelocity_Out.pdf")); // report.process(context, out); Options options = Options.getTo(ConverterTypeTo.PDF).via( ConverterTypeVia.XWPF); report.convert(context, options, out); } catch (IOException e) { e.printStackTrace(); } catch (XDocReportException e) { e.printStackTrace(); } } }
Project project = new Project( "XDocReport" ); context.put( "project", project );
Project project = new Project( "XDocReport" ); context.put( "project", project );