Package com.lowagie.text

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


            list = new List(false, 20);
            list.add(new ListItem("Bullet"));
            list.add(new ListItem("Another one"));
            doc.add(list);

            doc.newPage();

            Chapter chapter = new Chapter(new Paragraph("This is a Chapter"), 1);
            chapter.add(new Paragraph(
                    "This is some text that belongs to this chapter."));
            chapter.add(new Paragraph("A second paragraph. What a surprise."));
View Full Code Here


                        ph.add(new LwgPhrase(12, "\n\n" + cst(c), hex));
                        table.add(ph);
                    }
                }
                document.add(table);
                document.newPage();
            }
            // step 5
            document.close();
        }
        catch (Exception de) {
View Full Code Here

            // step 4
            String text = "Flanders International Filmfestival Ghent - Internationaal Filmfestival van Vlaanderen Gent";
            Paragraph p = new Paragraph(text);
            p.setAlignment(LwgElement.ALIGN_JUSTIFIED);
            document.add(p);
            document.newPage();
            writer.setSpaceCharRatio(PdfWriter.NO_SPACE_CHAR_RATIO);
            document.add(p);
        }
        catch (Exception de) {
            de.printStackTrace();
View Full Code Here

            p[4] = new Paragraph("Ea res est Helvetiis per indicium enuntiata.  Moribus suis Orgetoricem ex vinculis causam dicere coegerunt; damnatum poenam sequi oportebat, ut igni cremaretur.  Die constituta causae dictionis Orgetorix ad iudicium omnem suam familiam, ad hominum milia decem, undique coegit, et omnes clientes obaeratosque suos, quorum magnum numerum habebat, eodem conduxit; per eos ne causam diceret se eripuit.  Cum civitas ob eam rem incitata armis ius suum exequi conaretur multitudinemque hominum ex agris magistratus cogerent, Orgetorix mortuus est; neque abest suspicio, ut Helvetii arbitrantur, quin ipse sibi mortem consciverit.");
            for (int i = 0; i < 5; i++) {
              p[i].setAlignment(LwgElement.ALIGN_JUSTIFIED);
              document.add(p[i]);
            }
            document.newPage();
            for (int i = 0; i < 5; i++) {
              p[i].setAlignment(LwgElement.ALIGN_JUSTIFIED);
              p[i].setIndentationLeft(i * 15f);
              p[i].setIndentationRight((5 - i) * 15f);
              document.add(p[i]);
View Full Code Here

              p[i].setAlignment(LwgElement.ALIGN_JUSTIFIED);
              p[i].setIndentationLeft(i * 15f);
              p[i].setIndentationRight((5 - i) * 15f);
              document.add(p[i]);
            }
            document.newPage();
            for (int i = 0; i < 5; i++) {
              p[i].setAlignment(LwgElement.ALIGN_RIGHT);
              p[i].setSpacingAfter(15f);
              document.add(p[i]);
            }
View Full Code Here

            document.open();
            // step 4:
            // we add some content
            for (int k = 1; k <= 10; ++k) {
                document.add(new Paragraph("This document has the logical page numbers: i,ii,iii,iv,1,2,3,A-8,A-9,A-10\nReal page " + k));
                document.newPage();
            }
            PdfPageLabels pageLabels = new PdfPageLabels();
            pageLabels.addPageLabel(1, PdfPageLabels.LOWERCASE_ROMAN_NUMERALS);
            pageLabels.addPageLabel(5, PdfPageLabels.DECIMAL_ARABIC_NUMERALS);
            pageLabels.addPageLabel(8, PdfPageLabels.DECIMAL_ARABIC_NUMERALS, "A-", 8);
View Full Code Here

              p[i].setAlignment(LwgElement.ALIGN_CENTER);
              p[i].setSpacingAfter(15f);
              p[i].setSpacingBefore(15f);
              document.add(p[i]);
            }
            document.newPage();
    } catch (DocumentException de) {
      System.err.println(de.getMessage());
    } catch (IOException ioe) {
      System.err.println(ioe.getMessage());
    }
View Full Code Here

                status = ct.go();
                ct.setYLine(790);
                ct.setAlignment(LwgElement.ALIGN_JUSTIFIED);
                status = ct.go();
                if ((column == 0) && ((status & ColumnText.NO_MORE_COLUMN) != 0)) {
                    document.newPage();
                    cb.addTemplate(t, 0, 0);
                    cb.addImage(caesar, 100, 0, 0, 100, 260, 595);
                }
            }
        }
View Full Code Here

         aTable.insertTable(secondTable, new Point(1, 3));
         document.add(aTable);
         document.add(new Paragraph("converted to PdfPTable:"));
         aTable.setConvert2pdfptable(true);
         document.add(aTable);
         document.newPage();

         // example 2

         Table thirdTable = new Table(2);
         thirdTable.addCell("3rd table 0.0");
View Full Code Here

         aTable.insertTable(thirdTable, new Point(6, 2));
         document.add(aTable);
         document.add(new Paragraph("converted to PdfPTable:"));
         aTable.setConvert2pdfptable(true);
         document.add(aTable);
         document.newPage();

         // example 3
         aTable = new Table(3);
         float[] widths =
         {
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.