Package com.lowagie.text

Examples of com.lowagie.text.LwgDocument.newPage()


            cb.setGrayStroke(0.0f);
            cb.circle(150f, 400f, 150f);
            cb.fillStroke();
           
            // New Page to draw text in the pattern painter's canvas
            document.newPage();
           
            document.add(new Paragraph(text, FontFactory.getFont(FontFactory.HELVETICA, 60, LwgFont.BOLD, new GrayColor(0.3f))));
            document.add(new Paragraph(text, FontFactory.getFont(FontFactory.HELVETICA, 60, LwgFont.BOLD, pat1)));
            // draw a rectangle
            cb.setPatternFill(p1);
View Full Code Here


      cell.setPaddingTop(0f);
      cell.setPaddingLeft(20f);
      table.add(cell);
      document.add(table);
     
      document.newPage();
      table = new LwgPdfPTable(2);
      table.add("no leading at all");
      table.getDefaultCell().setLeading(0f, 0f);
      table.add("blah blah\nblah blah blah\nblah blah\nblah blah blah\nblah blah\nblah blah blah\nblah blah\nblah blah blah\n");
      table.getDefaultCell().setLeading(14f, 0f);
View Full Code Here

            cb.circle(150f, 400f, 150f);
            cb.fillStroke();
            cb.sanityCheck();
           
            // New page to place image in the pattern painter's canvas
            document.newPage();
            document.add(new Paragraph(text, FontFactory.getFont(FontFactory.HELVETICA, 60, LwgFont.BOLD, new GrayColor(0.3f))));
            document.add(new Paragraph(text, FontFactory.getFont(FontFactory.HELVETICA, 60, LwgFont.BOLD, pat2)));
            // The original LwgImage for comparison reason.
            // Note: The width and height is the same as bbox in pattern
            cb.addImage(img, img.getScaledWidth(), 0f, 0f, img.getScaledHeight(), 350f, 400f);
View Full Code Here

      roman.add(new ListItem("second item blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah"));
      for (int i = 3; i < 151; i++) {
        roman.add(i + "th item");
      }
      document.add(roman);
      document.newPage();
      RomanList roman2 = new RomanList(35);
      roman2.add(new ListItem("first item"));
      roman2.add(new ListItem("second item"));
      for (int i = 3; i < 11; i++) {
        roman2.add(i + "th item");
View Full Code Here

      roman2.add(new ListItem("second item"));
      for (int i = 3; i < 11; i++) {
        roman2.add(i + "th item");
      }
      document.add(roman2);
      document.newPage();
     
      // GreekList
      GreekList greek = new GreekList(15);
      greek.setLowercase(true);
      greek.add(new ListItem("first item"));
View Full Code Here

      greek.add(new ListItem("second item"));
      for (int i = 3; i < 20; i++) {
        greek.add(i + "th item");
      }
      document.add(greek);
      document.newPage();
     
      // GreekList
      GreekList greek2 = new GreekList(15);
      greek2.setLowercase(false);
      greek2.add(new ListItem("first item"));
View Full Code Here

      z.add(new ListItem("second item"));
      for (int i = 3; i < 20; i++) {
        z.add(i + "th item");
      }
      document.add(z);
      document.newPage();
     
      // ZapfDingbatsNumberList
      ZapfDingbatsNumberList z0 = new ZapfDingbatsNumberList(0, 15);
      z0.add(new ListItem("first item"));
      z0.add(new ListItem("second item"));
View Full Code Here

      document.add(table);
      document.add(table);
      document.add(new Paragraph("They are glued to eachother"));
      document.add(table);
      document.add(new Paragraph("This is not very nice. Turn to the next page to see how we solved this"));
      document.newPage();
      document.add(new Paragraph("We add 2 tables, but with a certain 'SpacingBefore':"));
      table.setSpacingBefore(15f);
      document.add(table);
      document.add(table);
      document.add(new Paragraph("Unfortunately, there was no spacing after."));
View Full Code Here

            aTable.addCell("1.3", new Point(1,3));
            document.add(aTable);
      document.add(new Paragraph("converted to PdfPTable:"));
      aTable.setConvert2pdfptable(true);
      document.add(aTable);
            document.newPage();    
            aTable = new Table(4,4);    // 4 rows, 4 columns
            aTable.setAlignment(LwgElement.ALIGN_CENTER);
            aTable.addCell("2.2", new Point(2,2));
            aTable.addCell("3.3", new Point(3,3));
            aTable.addCell("2.1", new Point(2,1));
View Full Code Here

            aTable.addCell("5.0", new Point(5,0))
            document.add(aTable);
      document.add(new Paragraph("converted to PdfPTable:"));
      aTable.setConvert2pdfptable(true);
      document.add(aTable);
            document.newPage();
            aTable = new Table(2,2);    // 2 rows, 2 columns
            aTable.setAlignment(LwgElement.ALIGN_LEFT);
            aTable.setAutoFillEmptyCells(true);
            aTable.addCell("0.0");
            aTable.addCell("0.1");
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.