IDEMPIERE-3104:default report engine is not good for big report

for pdf
This commit is contained in:
hieplq 2016-05-17 01:10:53 +07:00
parent b5a0e4f321
commit ed1e05b0bb
1 changed files with 3 additions and 2 deletions

View File

@ -74,13 +74,14 @@ public class Document {
document.newPage();
}
final PdfTemplate tp = cb.createTemplate(w, h);
final Graphics2D g2 = tp.createGraphics(w, h, mapper);
PdfTemplate tp = cb.createTemplate(w, h);
Graphics2D g2 = tp.createGraphics(w, h, mapper);
tp.setWidth(w);
tp.setHeight(h);
pageable.getPrintable(page).print(g2, pf, page);
g2.dispose();
cb.addTemplate(tp, 0, 0);
writer.releaseTemplate(tp);
}
document.close();