Package com.lowagie.text

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


                        ph.add(new Phrase(12, "\n\n" + cst(c), hex));
                        table.addCell(ph);
                    }
                }
                document.add(table);
                document.newPage();
            }
            // step 5
            document.close();
        }
        catch (Exception de) {
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(Element.ALIGN_JUSTIFIED);
              document.add(p[i]);
            }
            document.newPage();
            for (int i = 0; i < 5; i++) {
              p[i].setAlignment(Element.ALIGN_JUSTIFIED);
              p[i].setIndentationLeft(i * 15f);
              p[i].setIndentationRight((5 - i) * 15f);
              document.add(p[i]);
View Full Code Here

              p[i].setAlignment(Element.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(Element.ALIGN_RIGHT);
              p[i].setSpacingAfter(15f);
              document.add(p[i]);
            }
View Full Code Here

              p[i].setAlignment(Element.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

            cb.addTemplate(template, 0, 0);
            cb.addTemplate(template, 0, 1, -1, 0, 500, 200);
            cb.addTemplate(template, .5f, 0, 0, .5f, 100, 400);
           
            // we go to a new page
            document.newPage();
            cb.addTemplate(template, 0, 400);
            cb.addTemplate(template, 2, 0, 0, 2, -200, 400);
            cb.sanityCheck();
        }
        catch(DocumentException de) {
View Full Code Here

      cell.setPaddingTop(0f);
      cell.setPaddingLeft(20f);
      table.addCell(cell);
      document.add(table);
     
      document.newPage();
      table = new PdfPTable(2);
      table.addCell("no leading at all");
      table.getDefaultCell().setLeading(0f, 0f);
      table.addCell("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

            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

        name = (String) i.next();
        p = new Paragraph(name);
        document.add(p);
        c++;
      }
      document.newPage();
      String quick = "quick brown fox jumps over the lazy dog";
      p = new Paragraph("Fonts", FontFactory.getFont(FontFactory.HELVETICA, 16f));
      for (Iterator i = families.iterator(); i.hasNext() && c > 0; ) {
        name = (String) i.next();
        p = new Paragraph(name);
View Full Code Here

                status = ct.go();
                ct.setYLine(790);
                ct.setAlignment(Element.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

            new PdfOutline(other, new PdfAction("remote.pdf", 1), "Go to yhe first page of a remote file");
            new PdfOutline(other, new PdfAction("remote.pdf", "test"), "Go to a local destination in a remote file");
            new PdfOutline(other, PdfAction.javaScript("app.alert('Hello');\r", writer), "Say Hello");
           
            remote.add(new Paragraph("Some remote document"));
            remote.newPage();
            Paragraph p = new Paragraph("This paragraph contains a ");
            p.add(new Chunk("local destination").setLocalDestination("test"));
            remote.add(p);
    } catch (DocumentException de) {
      System.err.println(de.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.