Package com.itextpdf.text.pdf

Examples of com.itextpdf.text.pdf.PdfWriter$PdfTrailer


        if (!bitacoraList.isEmpty()) {

          Document document = new Document();

          ByteArrayOutputStream baos = new ByteArrayOutputStream();
          PdfWriter writer = PdfWriter.getInstance(document, baos);

          Cabecera event = new Cabecera(txtNegocio);
          writer.setPageEvent(event);

          document.open();

          Iterator<BitacoraLN> iteNovedadesfallas = bitacoraList
              .iterator();
View Full Code Here


      PdfPTable tabla = null;
      Document document = new Document();

      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      PdfWriter writer = PdfWriter.getInstance(document, baos);
      Map<String, Object> session = ActionContext.getContext().getSession();

      HeaderFooter event = new HeaderFooter((String)session.get("txtNegocio"));
      writer.setPageEvent(event);

      document.open();

      if (tipo.equals("0")) {// falla
        if (texto.trim().length() > 0) {
View Full Code Here

        gesSteuerabzug = lohnsteuer + kirchensteuer + soli;
        gesSozialversicherungsabzug = krankenversicherung + pflegeversicherung + rentenversicherung + arbeitslosenversicherung;
       
        Document document = new Document(new Rectangle(PageSize.A4));
        document.setPageCount(1);
        PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(FILE));
        writer.setPageEvent(new PDFHeaderFooterWriter());
        document.open();
        addMetaData(document);
        addPage(document);
        document.close();
        Desktop.getDesktop().open(new File(FILE));
View Full Code Here

   
    public PDFExport(int[][] persAndAusgezID, String filePath, PDF whatsNext) throws DocumentException, InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException, MalformedURLException, IOException {
     
      Document document = new Document(new Rectangle(PageSize.A4));
      document.setPageCount(1);
      PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(filePath));
      writer.setPageEvent(new PDFHeaderFooterWriter());
      document.open();
      addMetaData(document);
     
      for(int i = 0; i < persAndAusgezID.length; i++){
        if(i > 0)
View Full Code Here

    public PDFExport() {
     
      try {
        Document document = new Document(new Rectangle(PageSize.A4));
        document.setPageCount(1);
        PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(FILE));
        writer.setPageEvent(new PDFHeaderFooterWriter());
        document.open();
        addMetaData(document);
        addPage(document);
        document.close();
        Desktop.getDesktop().open(new File(FILE));
View Full Code Here

            // Initialize the Document and register it with PdfWriter listener and the OutputStream
            Document document = new Document(PageSize.A4.rotate(), 60, 60, 40, 40);
            document.addCreationDate();

            PdfWriter writer = PdfWriter.getInstance(document, out);
            writer.setPageEvent(new PdfPageEventHelper()
            {

                @Override
                public void onEndPage(PdfWriter writer, Document document)
                {

                    Rectangle rect = writer.getBoxSize("art");
                    ColumnText.showTextAligned(writer.getDirectContent(), Element.ALIGN_CENTER, new Phrase(
                        TagConstants.EMPTY_STRING,
                        smallFont), (rect.getLeft() + rect.getRight()) / 2, rect.getBottom() - 18, 0);

                }
View Full Code Here

    com.itextpdf.text.Rectangle r = new com.itextpdf.text.Rectangle(0, 0,
        graphContainer.getWidth(), graphContainer.getHeight());

    Document document = new Document(r);
    try {
      PdfWriter writer;
      writer = PdfWriter.getInstance(document, new FileOutputStream(
          filepath));
      document.open();
      PdfContentByte cb = writer.getDirectContent();
      PdfTemplate tp = cb.createTemplate(graphContainer.getWidth(),
          graphContainer.getHeight());
      Graphics2D g2d = tp.createGraphics(graphContainer.getWidth(),
          graphContainer.getHeight(), new DefaultFontMapper());
View Full Code Here

      List<JFreeChart> charts) throws IOException {
    Rectangle rect = PageSize.A4.rotate();
    Document document = new Document(rect);
    OutputStream out = new FileOutputStream(filename);
    try {
      PdfWriter writer = PdfWriter.getInstance(document, out);
      document.addAuthor("Daniel Velten");
      document.addTitle(title);
      document.open();
     
      for (JFreeChart chart : charts) {
View Full Code Here

      List<JFreeChart> charts1, List<JFreeChart> charts2) throws IOException {
    Rectangle rect = PageSize.A4.rotate();
    Document document = new Document(rect);
    OutputStream out = new FileOutputStream(filename);
    try {
      PdfWriter writer = PdfWriter.getInstance(document, out);
      document.addAuthor("Daniel Velten");
      document.addTitle(title);
      document.open();
     
      for (int i=0; i<2;i++) {
View Full Code Here

      size = PageSize.A0.rotate();
    }

    Document document = new Document(size, 15, 15, 10, 10);
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    PdfWriter writer = PdfWriter.getInstance(document, baos);
    document.open();
    populatePdf(document, writer, qr);

    // do we want to add a svg image?
    if (StringUtils.isNotBlank(svg)) {
      document.newPage();
      StringBuffer s1 = new StringBuffer(svg);
      if (!svg.startsWith("<svg xmlns=\"http://www.w3.org/2000/svg\" ")) {
        s1.insert(s1.indexOf("<svg") + 4, " xmlns='http://www.w3.org/2000/svg'");
      }

      String t = "<?xml version='1.0' encoding='ISO-8859-1'"
                 + " standalone='no'?>" + s1.toString();
      PdfContentByte cb = writer.getDirectContent();
      cb.saveState();
      cb.concatCTM(1.0f, 0, 0, 1.0f, 36, 0);
      float width = document.getPageSize().getWidth() - 20;
      float height = document.getPageSize().getHeight() - 20;
      Graphics2D g2 = cb.createGraphics(width, height);
View Full Code Here

TOP

Related Classes of com.itextpdf.text.pdf.PdfWriter$PdfTrailer

Copyright © 2018 www.massapicom. 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.