public static void addChartToPDF2(JFreeChart chart,
PdfWriter writer, int row, int column) {
Rectangle rect = PageSize.A6.rotate();
Rectangle rect2 = PageSize.A4.rotate();
PdfContentByte cb = writer.getDirectContent();
PdfTemplate tp = cb.createTemplate(rect.getWidth(), rect.getHeight());
Graphics2D g2 = tp.createGraphics(rect.getWidth(), rect.getHeight(), new DefaultFontMapper());
Rectangle2D r2D = new Rectangle2D.Double(0, 0, rect2.getWidth(), rect2.getHeight());
g2.setTransform(AffineTransform.getScaleInstance(rect.getWidth()/rect2.getWidth(), rect.getHeight()/rect2.getHeight()));
chart.draw(g2, r2D, null);
g2.dispose();
cb.addTemplate(tp, column * rect.getWidth(), row * rect.getHeight());