jasperDesign.setRightMargin(20);
jasperDesign.setTopMargin(30);
jasperDesign.setBottomMargin(30);
//Fonts
normalFont = new JRDesignReportFont();
normalFont.setName("Arial_Normal");
normalFont.setDefault(true);
normalFont.setFontName("Arial");
normalFont.setSize(10);
normalFont.setPdfFontName("Helvetica");
normalFont.setPdfEncoding("Cp1252");
normalFont.setPdfEmbedded(false);
jasperDesign.addFont(normalFont);
boldFont = new JRDesignReportFont();
boldFont.setName("Arial_Bold");
boldFont.setDefault(false);
boldFont.setFontName("Arial");
boldFont.setSize(12);
boldFont.setBold(true);
boldFont.setPdfFontName("Helvetica-Bold");
boldFont.setPdfEncoding("Cp1252");
boldFont.setPdfEmbedded(false);
jasperDesign.addFont(boldFont);
italicFont = new JRDesignReportFont();
italicFont.setName("Arial_Italic");
italicFont.setDefault(false);
italicFont.setFontName("Arial");
italicFont.setSize(12);
italicFont.setItalic(true);
italicFont.setPdfFontName("Helvetica-Oblique");
italicFont.setPdfEncoding("Cp1252");
italicFont.setPdfEmbedded(false);
jasperDesign.addFont(italicFont);
//Title
JRDesignBand band = new JRDesignBand();
band.setHeight(50);
JRDesignLine line = new JRDesignLine();
line.setX(0);
line.setY(0);
line.setWidth(968);
line.setHeight(0);
band.addElement(line);
JRDesignStaticText text = new JRDesignStaticText();
text.setX(0);
text.setY(10);
text.setWidth(968);
text.setHeight(30);
text.setTextAlignment(JRTextElement.TEXT_ALIGN_CENTER);
JRDesignReportFont bigFont = new JRDesignReportFont();
bigFont.setName("Arial_Normal");
bigFont.setDefault(true);
bigFont.setFontName("Arial");
bigFont.setSize(22);
bigFont.setPdfFontName("Helvetica");
bigFont.setPdfEncoding("Cp1252");
bigFont.setPdfEmbedded(false);
text.setFont(bigFont);
text.setText(reportDefinition.getName());
band.addElement(text);
jasperDesign.setTitle(band);