@Override
 public void generatePrintForm(Reference reference, OutputStream outputStream) {
   ReportXml reportXml = new ReportXml();
   if (reference.getPrintTemplate() == null
       || reference.getPrintTemplate().getFileName() == null) {
     setDefaultPrintTemplate(reference);
   }
   reportXml.setTemplateFileName(reference.getPrintTemplate().getFileName());
   build(reportXml, studentDAO.findById(reference.getOwnerId()), reference.getPurpose());
   ReportPdfProcessor.getInstance().generate(reportXml, outputStream);
 }
  @Override
  public void generatePrintForm(List<Reference> references, OutputStream outputStream) {
    List<Report> reports = new ArrayList<Report>();

    for (Reference reference : references) {
      ReportXml reportXml = new ReportXml();
      if (reference.getPrintTemplate() == null
          || reference.getPrintTemplate().getFileName() == null) {
        setDefaultPrintTemplate(reference);
      }
      reportXml.setTemplateFileName(reference.getPrintTemplate().getFileName());
      build(reportXml, studentDAO.findById(reference.getOwnerId()), reference.getPurpose());
      reports.add(reportXml);
    }
    ReportPdfProcessor.getInstance().generate(reports, outputStream);
  }