Examples of GeracaoBoletoException


Examples of br.com.caelum.stella.boleto.exception.GeracaoBoletoException

    try {
      JRHtmlExporter exporter = getHtmlExporter(request);
      exporter.setParameter(JRHtmlExporterParameter.OUTPUT_WRITER, writer);
      exporter.exportReport()
    } catch (JRException e) {
      throw new GeracaoBoletoException(e);
    }
  }
View Full Code Here

Examples of br.com.caelum.stella.boleto.exception.GeracaoBoletoException

      fonteSimples = BaseFont.createFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.EMBEDDED);
      fonteBold = BaseFont.createFont(BaseFont.HELVETICA_BOLD, BaseFont.WINANSI, BaseFont.EMBEDDED);

    } catch (DocumentException e) {
      throw new GeracaoBoletoException(e);
    } catch (IOException e) {
      throw new GeracaoBoletoException(e);
    }

    document.open();
    contentByte = writer.getDirectContent();
    document.newPage();
View Full Code Here

Examples of br.com.caelum.stella.boleto.exception.GeracaoBoletoException

      PdfTemplate template = contentByte.createTemplate(image.getWidth(), image.getHeight());
      template.addImage(pdfImage);
      final float leftMargin = document.leftMargin();
      contentByte.addTemplate(template, leftMargin + x, y);
    } catch (BadElementException e) {
      throw new GeracaoBoletoException(e);
    } catch (DocumentException e) {
      throw new GeracaoBoletoException(e);
    }
  }
View Full Code Here

Examples of br.com.caelum.stella.boleto.exception.GeracaoBoletoException

        "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
    try {
      velocityEngine.init(config);
      template = velocityEngine.getTemplate("/br/com/caelum/stella/boleto/template_html.vm");
    } catch (Exception e) {
      throw new GeracaoBoletoException("Não foi possivel iniciar a configuração do Velocity", e);
    }
  }
View Full Code Here

Examples of br.com.caelum.stella.boleto.exception.GeracaoBoletoException

    if (stream == null) {
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      try {
        ImageIO.write(PNGimage, "PNG", baos);
      } catch (IOException e) {
        throw new GeracaoBoletoException(e); // nao esperado
      }
      stream = new ByteArrayInputStream(baos.toByteArray());
    }
    return stream;
  }
View Full Code Here

Examples of br.com.caelum.stella.boleto.exception.GeracaoBoletoException

   */
  public void geraHTML(String arquivo) {
    try {
      JasperExportManager.exportReportToHtmlFile(geraRelatorio(), arquivo);
    } catch (JRException e) {
      throw new GeracaoBoletoException(e);
    }
  }
View Full Code Here

Examples of br.com.caelum.stella.boleto.exception.GeracaoBoletoException

    try {
      JRHtmlExporter exporter = getHtmlExporter(request);
      exporter.setParameter(JRHtmlExporterParameter.OUTPUT_WRITER, writer);
      exporter.exportReport()
    } catch (JRException e) {
      throw new GeracaoBoletoException(e);
    }
  }
View Full Code Here

Examples of br.com.caelum.stella.boleto.exception.GeracaoBoletoException

      templateJasper = GeradorDeBoleto.class.getResourceAsStream("/br/com/caelum/stella/boleto/templates/boleto-default.jasper");
      parametros.put(JRParameter.REPORT_LOCALE, new Locale("pt", "BR"));
      InputStream template_sub = GeradorDeBoleto.class.getResourceAsStream("/br/com/caelum/stella/boleto/templates/boleto-default_instrucoes.jasper");
      parametros.put("SUB_INSTRUCOES", JRLoader.loadObject(template_sub));
    } catch (JRException e) {
      throw new GeracaoBoletoException(e);
    }
  }
View Full Code Here

Examples of br.com.caelum.stella.boleto.exception.GeracaoBoletoException

        JRBeanCollectionDataSource dataSource = new JRBeanCollectionDataSource(Arrays.asList(boletos));
        relatorio = JasperFillManager.fillReport(templateJasper,parametros,  dataSource);
      }
      return relatorio;
    }catch(Exception e){
      throw new GeracaoBoletoException(e);
    }
  }
View Full Code Here

Examples of br.com.caelum.stella.boleto.exception.GeracaoBoletoException

  public void geraPDF(File arquivo) {
    try {
      OutputStream out = new FileOutputStream(arquivo);
      geraPDF(out);
    } catch (FileNotFoundException e) {
      throw new GeracaoBoletoException(e);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.