public class ImageExporter extends AbstractAppExporter
构造器和说明 |
---|
ImageExporter()
Constructor
|
ImageExporter(java.lang.String suffix)
Constructor
|
ImageExporter(java.lang.String suffix,
int resolution)
Constructor
|
限定符和类型 | 方法和说明 |
---|---|
void |
export(java.io.OutputStream out,
PageSetProvider pageSet)
导出
|
void |
export(java.io.OutputStream out,
ReportPageProvider reportPage)
导出
|
void |
export(java.io.OutputStream out,
ResultWorkBook book)
导出图片
导出png类型图片的例子:
WorkBook workbook = (WorkBook) TemplateWorkBookIO.readTemplateWorkBook(FRContext.getCommonOperator(), "1.cpt");
PageRWorkBook book = (PageRWorkBook) workbook.execute(new HashMap(), ActorFactory.getActor("page"));
OutputStream out = res.getOutputStream();
new ImageExporter("png").export(out, book);
|
java.awt.image.BufferedImage |
exportToImage(WorkBook workbook) |
java.lang.String |
getSuffix() |
void |
setSuffix(java.lang.String suffix) |
export, export, setVersion
public ImageExporter()
public ImageExporter(java.lang.String suffix)
public ImageExporter(java.lang.String suffix, int resolution)
public void setSuffix(java.lang.String suffix)
public java.lang.String getSuffix()
public void export(java.io.OutputStream out, ResultWorkBook book) throws java.lang.Exception
导出png类型图片的例子:
WorkBook workbook = (WorkBook) TemplateWorkBookIO.readTemplateWorkBook(FRContext.getCommonOperator(), "1.cpt"); PageRWorkBook book = (PageRWorkBook) workbook.execute(new HashMap(), ActorFactory.getActor("page")); OutputStream out = res.getOutputStream(); new ImageExporter("png").export(out, book);
out
- 输出流book
- 结果报表java.lang.Exception
public java.awt.image.BufferedImage exportToImage(WorkBook workbook)
public void export(java.io.OutputStream out, PageSetProvider pageSet) throws java.lang.Exception
export
在接口中 AppExporter
export
在类中 AbstractAppExporter
out
- 输出流pageSet
- 报表分页处理之后的页集合java.lang.Exception
public void export(java.io.OutputStream out, ReportPageProvider reportPage) throws java.lang.Exception
out
- 输出流reportPage
- 报表分页输出多副图片java.lang.Exception