Package org.projectforge.renderer.custom

Examples of org.projectforge.renderer.custom.Formatter


    // get the sheets from the given Format
    final String styleSheet = "fo-styles/" + form.getExportFormat() + "/timesheet-template-fo.xsl";
    final String xmlData = "fo-styles/" + form.getExportFormat() + "/timesheets2pdf.xml";

    // get the formatter for the different export formats
    final Formatter formatter = formatterFactory.getFormatter(form.getExportFormat());

    final Integer taskId = filter.getTaskId();

    final Map<String, Object> data = formatter.getData(timeSheets, taskId, getRequest(), getResponse(), filter);

    // render the PDF with fop
    final byte[] content = pdfRenderer.render(styleSheet, xmlData, data);

    DownloadUtils.setDownloadTarget(content, filename);
View Full Code Here

TOP

Related Classes of org.projectforge.renderer.custom.Formatter

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.