Package com.lowagie.text.pdf

Examples of com.lowagie.text.pdf.PdfPTable.writeSelectedRows()


            cell2.setBorder( 0 );

            head.addCell( cell2 );

            head.setTotalWidth( page.getWidth() - document.leftMargin() - document.rightMargin() );
            head.writeSelectedRows( 0,
                                    -1,
                                    document.leftMargin(),
                                    page.getHeight() - document.topMargin() + head.getTotalHeight(),
                                    writer.getDirectContent() );
View Full Code Here


            cell2.setBorder( 0 );

            head.addCell( cell2 );

            head.setTotalWidth( page.getWidth() - document.leftMargin() - document.rightMargin() );
            head.writeSelectedRows( 0,
                                    -1,
                                    document.leftMargin(),
                                    page.getHeight() - document.topMargin() + head.getTotalHeight(),
                                    writer.getDirectContent() );
View Full Code Here

            }
            PdfContentByte cb = writer.getDirectContent();
            cb.saveState();
            // write the headertable
            table.setTotalWidth(document.right() - document.left());
            table.writeSelectedRows(0, -1, document.left(), document.getPageSize().getHeight() - 50, cb);
            // compose the footer
            String text = "Page " + writer.getPageNumber();
            float textSize = helv.getWidthPoint(text, 12);
            float textBase = document.bottom() - 20;
            cb.beginText();
View Full Code Here

      addCellaNormale(head, "", Element.ALIGN_CENTER);
      addCellaNormale(head, "ESTRATTO CONTO AL " + sdf.format(dataRiferimento), Element.ALIGN_CENTER);
      addCellaNormale(head, "Pagina " + writer.getCurrentPageNumber(), Element.ALIGN_RIGHT);

      head.setTotalWidth(page.getWidth() - document.leftMargin() - document.rightMargin());
      head.writeSelectedRows(0, -1, document.rightMargin(),
          page.getHeight() - document.topMargin() + head.getTotalHeight(), writer.getDirectContent());

    } catch (Exception e) {
      throw new ExceptionConverter(e);
    }
View Full Code Here

        headerTable.getDefaultCell().setPaddingBottom(15);
        headerTable.addCell(new Paragraph(title, TITLE_FONT));
        headerTable.getDefaultCell().setBorderWidth(0);
        headerTable.getDefaultCell().setPaddingBottom(0);
        headerTable.addCell(new Paragraph(StringUtils.defaultString(description), NORMAL_TEXT_FONT));
        headerTable.writeSelectedRows(0, -1, 10, pageRectangle.height(), docWriter.getDirectContent());

        PdfPTable table = newTable(pageRectangle, 2);

        for (int i = 0; i < fields.length; i++) {
            addFieldCell(table, fields[i]);
View Full Code Here

        PdfPTable table = newTable(pageRectangle, 2);

        for (int i = 0; i < fields.length; i++) {
            addFieldCell(table, fields[i]);
        }
        table.writeSelectedRows(0, -1, 10f, 10f + table.getRowHeight(0), docWriter.getDirectContent());
    }

    private PdfPTable newTable(Rectangle pageRectangle, int columns) {
        PdfPTable table = new PdfPTable(columns);
        table.getDefaultCell().setBorderWidth(0);
View Full Code Here

        }
        else{
          // TODO: setALT!
        }
        logger.debug("Add table");
        table.writeSelectedRows(0, -1, xPos, yPos, writer.getDirectContent());
        logger.debug("Document added");
      }


    }
View Full Code Here

                Hdr hdr = headerFooterPolicy.getHeader(writer.getPageNumber()).getJaxbElement();
                PdfPTable head = new PdfPTable(1); // num cols             
                // TODO - no cell borders
                traverseBlockLevelContent( hdr.getEGBlockLevelElts(), head);
                head.setTotalWidth(page.getWidth() - document.leftMargin() - document.rightMargin());
                head.writeSelectedRows(0, -1, document.leftMargin(), page.getHeight() - document.topMargin() + head.getTotalHeight(),
                    writer.getDirectContent());
              }
             
              if (headerFooterPolicy.getFooter(writer.getPageNumber())!=null) {
                Ftr ftr = headerFooterPolicy.getFooter(writer.getPageNumber()).getJaxbElement();             
View Full Code Here

              if (headerFooterPolicy.getFooter(writer.getPageNumber())!=null) {
                Ftr ftr = headerFooterPolicy.getFooter(writer.getPageNumber()).getJaxbElement();             
                PdfPTable foot = new PdfPTable(1);
                traverseBlockLevelContent( ftr.getEGBlockLevelElts(), foot);
                foot.setTotalWidth(page.getWidth() - document.leftMargin() - document.rightMargin());
                foot.writeSelectedRows(0, -1, document.leftMargin(), document.bottomMargin(),
                    writer.getDirectContent());
              }
          }
          catch (Exception e) {
              throw new ExceptionConverter(e);
View Full Code Here

            }
            PdfContentByte cb = writer.getDirectContent();
            cb.saveState();
            // write the headertable
            table.setTotalWidth(document.right() - document.left());
            table.writeSelectedRows(0, -1, document.left(), document.getPageSize().height() - 50, cb);
            // compose the footer
            String text = "Page " + writer.getPageNumber();
            float textSize = helv.getWidthPoint(text, 12);
            float textBase = document.bottom() - 20;
            cb.beginText();
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.