Examples of LwgPdfPTable


Examples of com.lowagie.text.pdf.LwgPdfPTable

      PdfWriter.getInstance(document, new GfrFileOutputStream("com.lowagie.examples.objects.tables.DefaultCell.pdf"));

      // step 3: we open the document
      document.open();

      LwgPdfPTable table = new LwgPdfPTable(3);
      LwgPdfPCell cell = new LwgPdfPCell(new Paragraph("header with colspan 3"));
      cell.setColspan(3);
      table.add(cell);
      table.add("1.1");
      table.add("2.1");
      table.add("3.1");
      table.getDefaultCell().setGrayFill(0.8f);
      table.add("1.2");
      table.add("2.2");
      table.add("3.2");
      table.getDefaultCell().setGrayFill(0f);
      table.getDefaultCell().setBorderColor(new Color(255, 0, 0));
      table.add("cell test1");
      table.getDefaultCell().setColspan(2);
      table.getDefaultCell().setBackgroundColor(new Color(0xC0, 0xC0, 0xC0));
      table.add("cell test2");
      document.add(table);
    } catch (DocumentException de) {
      System.err.println(de.getMessage());
    } catch (IOException ioe) {
      System.err.println(ioe.getMessage());
View Full Code Here

Examples of com.lowagie.text.pdf.LwgPdfPTable

      PdfWriter.getInstance(document, new GfrFileOutputStream("com.lowagie.examples.objects.tables.MyFirstTable.pdf"));

      // step 3: we open the document
      document.open();

      LwgPdfPTable table = new LwgPdfPTable(3);
      LwgPdfPCell cell = new LwgPdfPCell(new Paragraph("header with colspan 3"));
      cell.setColspan(3);
      table.add(cell);
      table.add("1.1");
      table.add("2.1");
      table.add("3.1");
      table.add("1.2");
      table.add("2.2");
      table.add("3.2");
      cell = new LwgPdfPCell(new Paragraph("cell test1"));
      cell.setBorderColor(new Color(255, 0, 0));
      table.add(cell);
      cell = new LwgPdfPCell(new Paragraph("cell test2"));
      cell.setColspan(2);
      cell.setBackgroundColor(new Color(0xC0, 0xC0, 0xC0));
      table.add(cell);
      document.add(table);
    } catch (DocumentException de) {
      System.err.println(de.getMessage());
    } catch (IOException ioe) {
      System.err.println(ioe.getMessage());
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.