Package com.lowagie.text

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


      {
         // step 2: creation of the writer-object
         PdfWriter.getInstance(document,
                 new GfrFileOutputStream("com.lowagie.examples.objects.tables.alternatives.LargeCell.pdf"));
         // step 3: we open the document
         document.open();
         // step 4: we create a table and add it to the document
         Table table = new Table(3);
         table.setCellsFitPage(true);
         String text = "long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long text";
         table.addCell("text");
View Full Code Here


    try {
      // step2
      PdfWriter.getInstance(document,
          new GfrFileOutputStream("com.lowagie.examples.objects.tables.AddBigTable.pdf"));
      // step3
      document.open();
      // step4
      String[] bogusData = { "M0065920", "SL", "FR86000P", "PCGOLD",
          "119000", "96 06", "2001-08-13", "4350", "6011648299",
          "FLFLMTGP", "153", "119000.00" };
      int NumColumns = 12;
View Full Code Here

      {
         // step 2: creation of the writer
         PdfWriter.getInstance(document,
                 new GfrFileOutputStream("com.lowagie.examples.objects.tables.alternatives.NestedTables.pdf"));
         // step 3: we open the document
         document.open();
         // step 4: we create a table and add it to the document

         // example 1

         Table secondTable = new Table(2);
View Full Code Here

    try {
      // step 2:
      PdfWriter.getInstance(document, new GfrFileOutputStream("com.lowagie.examples.objects.tables.ImageCell.pdf"));

      // step 3: we open the document
      document.open();
      LwgImage image = LwgImage.getInstance("otsoe.jpg");
      float[] widths = {1f, 4f};
      LwgPdfPTable table = new LwgPdfPTable(widths);
      table.add("This is my dog");
      table.add(image);
View Full Code Here

    try {
      // step2
      PdfWriter.getInstance(document,
          new GfrFileOutputStream("com.lowagie.examples.objects.tables.CellColors.pdf"));
      // step3
      document.open();
      // step4
      LwgPdfPTable table = new LwgPdfPTable(4);
      LwgPdfPCell cell;
      cell = new LwgPdfPCell(new Paragraph("test colors:"));
      table.add(cell);
View Full Code Here

      // we create a writer that listens to the document
      PdfWriter.getInstance(document,
          new GfrFileOutputStream("com.lowagie.examples.fonts.styles.FontStylePropagation.pdf"));

      // step 3: we open the document
      document.open();
      // step 4:
      LwgPhrase myPhrase = new LwgPhrase("Hello 1! ", new LwgFont(LwgFont.TIMES_ROMAN, 8, LwgFont.BOLD));
            myPhrase.add(new LwgPhrase("some other font ", new LwgFont(LwgFont.HELVETICA, 8)));
            myPhrase.add(new LwgPhrase("This is the end of the sentence.\n", new LwgFont(LwgFont.TIMES_ROMAN, 8, LwgFont.ITALIC)));
            document.add(myPhrase);
View Full Code Here

    try {
      // step2
      PdfWriter writer = PdfWriter.getInstance(document,
          new GfrFileOutputStream("com.lowagie.examples.objects.tables.TableBorders.pdf"));
      // step3
      document.open();
      // step4
     
      // page 1
          LwgFont tableFont = FontFactory.getFont("Helvetica", 8, LwgFont.BOLD, Color.BLACK);
          float padding = 0f;
View Full Code Here

           
            // we add some meta information to the document
            document.addAuthor("Alan Soukup");
            document.addSubject("This is the result of a Test.");
           
            document.open();
           
            Table datatable = new Table(10);
           
            int headerwidths[] = {10, 24, 12, 12, 7, 7, 7, 7, 7, 7};
            datatable.setWidths(headerwidths);
View Full Code Here

        System.out.println("Demonstrates basic use of RTF drawing objects");
        try {
            LwgDocument document = new LwgDocument();
            RtfWriter2.getInstance(document, new FileOutputStream("DrawingObjects.rtf"));

            document.open();

            document.add(new Paragraph("This text will wrap around the shape that\n" +
                    "we will define. Different\n" +
                    "wrapping modes are possible."));
           
View Full Code Here

        try {
            // step 2: creation of the writer
            PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream("transformations.pdf"));
           
            // step 3: we open the document
            document.open();
           
            // step 4:
            PdfContentByte cb = writer.getDirectContent();
           
            // we create a PdfTemplate
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.