Examples of writeSelectedRows()


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

        head.addCell(textCell);

        head.setTotalWidth(page.getWidth() - document.leftMargin()
            - document.rightMargin());

        head.writeSelectedRows(
            0,
            -1,
            document.leftMargin(),
            page.getHeight() - document.topMargin()
                + head.getTotalHeight(),
View Full Code Here

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

                head.addCell(textCell);

                head.setTotalWidth(page.getWidth() - document.leftMargin()
                                - document.rightMargin());

                head.writeSelectedRows(0, -1, document.leftMargin(), page
                                .getHeight()
                                - document.topMargin() + head.getTotalHeight(), writer
                                .getDirectContent())
                document.add(new Paragraph("\n"));
View Full Code Here

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

            tmp.setUseBorderPadding(false);
            tmp.setHorizontalAlignment(Element.ALIGN_LEFT);
            head.addCell(tmp);           
           
            head.setTotalWidth(page.getWidth() - document.leftMargin() - document.rightMargin());
            head.writeSelectedRows(0, -1, document.leftMargin(), document.bottomMargin()+50,
            writer.getDirectContent());
        }
        catch (Exception e) {
            throw new ExceptionConverter(e);
        }
View Full Code Here

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

            }
            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

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

      pageTable.setTotalWidth(100F);
      PdfPCell c = new PdfPCell(new Paragraph("Seite " + writer.getPageNumber()));
      c.setBorder(0);
      c.setHorizontalAlignment(PdfPCell.ALIGN_RIGHT);
      pageTable.addCell(c);
      pageTable.writeSelectedRows(0, -1, 480F, 30F, cb);
     
    }
  }

  public void onChapter(PdfWriter arg0, Document arg1, float arg2, Paragraph arg3) {}
View Full Code Here

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

            LwgRectangle page = document.getPageSize();
            LwgPdfPTable head = new LwgPdfPTable(3);
            for (int k = 1; k <= 6; ++k)
                head.add("head " + k);
            head.setTotalWidth(page.getWidth() - document.leftMargin() - document.rightMargin());
            head.writeSelectedRows(0, -1, document.leftMargin(), page.getHeight() - document.topMargin() + head.getTotalHeight(),
                writer.getDirectContent());
            LwgPdfPTable foot = new LwgPdfPTable(3);
            for (int k = 1; k <= 6; ++k)
                foot.add("foot " + k);
            foot.setTotalWidth(page.getWidth() - document.leftMargin() - document.rightMargin());
View Full Code Here

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

                writer.getDirectContent());
            LwgPdfPTable foot = new LwgPdfPTable(3);
            for (int k = 1; k <= 6; ++k)
                foot.add("foot " + k);
            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

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

            ptable.add(new LwgPhrase("Ben Forta", font9));
            ptable.add(new LwgPhrase("Pub Date:", font9));
            ptable.add(new LwgPhrase("06/05/1998", font9));
            ptable.setTotalWidth(columnWidth);

            currentY = ptable.writeSelectedRows(0, -1, document.left(), currentY, cb) - 20;
            for (int k = 0; k < headings.length; ++k) {
                ct.addText(new Chunk(headings[k] + "\n", font14B));
                ct.addText(new Chunk(texts[k] + "\n\n", font11));
            }
View Full Code Here

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

           
            // add the table with document add
            document.add(table);
            // add the table at an absolute position
            table.setTotalWidth(300);
            table.writeSelectedRows(0, -1, 100, 600, writer.getDirectContent());
           
            document.newPage();
           
            table = new LwgPdfPTable(4);
            float fontSize = 12;
View Full Code Here

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

            LwgPdfPTable table = new LwgPdfPTable(10);
            for (int k = 1; k <= 100; ++k) {
                table.add("The number " + k);
            }
            table.setTotalWidth(800);
            table.writeSelectedRows(0, 5, 0, -1, 50, 650, cb);
            document.newPage();
            table.writeSelectedRows(5, -1, 0, -1, 50, 650, cb);
            document.close();
    } catch (Exception de) {
      de.printStackTrace();
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.