Package com.lowagie.text.pdf

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


                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

            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

           
            // 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

            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

                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();
    }
    // step5
View Full Code Here

      table.add("text 3");
      im.setRotationDegrees(0);
      table.add(im);
      table.setTotalWidth(300);
      PdfContentByte cb = writer.getDirectContent();
      table.writeSelectedRows(0, -1, 50, 600, cb);
      table.setHeaderRows(3);
      document.add(table);
    } catch (Exception de) {
      de.printStackTrace();
    }
View Full Code Here

            // 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;
            BaseFont bf = BaseFont.createFont("Helvetica", "winansi", false);
View Full Code Here

      table.add(new LwgPhrase("32 Gravitation Court", font8));
      table.add(new LwgPhrase("39100 Dole France", font8));
      table.add(new LwgPhrase("12345 Ulm Germany", font8));
      table.add(new LwgPhrase("45789 Cambridge  England", font8));
     
      table.writeSelectedRows(0, -1, 50, pos, writer.getDirectContent());
    }

    catch (DocumentException de) {
      System.err.println(de.getMessage());
    } catch (IOException ioe) {
View Full Code Here

            table.getDefaultCell().setBorder(LwgRectangle.LEFT | LwgRectangle.RIGHT);
            for (int k = 0; k < 24; ++k) {
                table.add("cell " + k);
            }
            table.setTotalWidth(300f);
            table.writeSelectedRows(0, -1, 100, 600, writer.getDirectContent());
            document.newPage();
            document.add(table);
            document.newPage();
            table = new LwgPdfPTable(2);
            float[] rows = { 50f, 250f };
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.