package com.jasper import org.codehaus.groovy.grails.plugins.jasper.JasperExportFormat import org.codehaus.groovy.grails.plugins.jasper.JasperReportDef class LabController { def jasperService def directpdf() { def reportDef = new JasperReportDef(name:'mbarang.jrxml', fileFormat:JasperExportFormat.PDF_FORMAT) response.contentType = 'application/pdf' response.outputStream << jasperService.generateReport(reportDef).toByteArray() return(false); } }
Wednesday, June 25, 2014
Grails Jasper plugins - direct pdf output
I use jasper plugin (http://grails.org/plugin/jasper) in my grails application. I want to send direct pdf file to the browser.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment