Package com.lowagie.text

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


         aTable.addCell("new cell");
         document.add(aTable);
         document.add(new Paragraph("converted to PdfPTable:"));
         aTable.setConvert2pdfptable(true);
         document.add(aTable);
         document.newPage();

         // relative column widths are preserved

         Table a = new Table(2);
         a.setWidths(new float[]
View Full Code Here


          LwgFont font = FontFactory.getFont("Helvetica", 10);
          Paragraph p;
          p = new Paragraph("\nVarious border widths and colors\nuseAscender=true, useDescender=true", font);
          document.add(p);
         
          document.newPage();
         
          // page 2
          padding = 2f;
          border = new LwgRectangle(0f, 0f);
          border.setBorderWidthLeft(1f);
View Full Code Here

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

      SAXParser parser = SAXParserFactory.newInstance().newSAXParser();

      // step 4: we parse the document
      parser.parse("playRomeoJuliet.xml", new Events().getXmlHandler(document));

      document.newPage();
      Speaker speaker;
      for (Iterator i = events.getSpeakers().iterator(); i.hasNext();) {
        speaker = (Speaker) i.next();
        document.add(new Paragraph(speaker.getName() + ": "
            + speaker.getOccurrence() + " speech blocks"));
View Full Code Here

            cb.moveTo(100f, 200f);
            cb.lineTo(200f, 250f);
            cb.lineTo(400f, 150f);
            cb.fill();
            // cb.sanityCheck is called during newPage().
            document.newPage();
            String text = "Some text to show";
            document.add(new Paragraph(text, new LwgFont(LwgFont.HELVETICA, 24, LwgFont.NORMAL, new SpotColor(spc_cmyk, 0.25f))));
            document.add(new Paragraph(text, new LwgFont(LwgFont.HELVETICA, 24, LwgFont.NORMAL, new SpotColor(spc_cmyk, 0.5f))));
           
            // example with template
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

            // only for DocumentB.pdf:
            writerA.pause();
            document.add(p3b);
            document.add(p2);
            document.add(p2);
            document.newPage();
            document.add(p2);
            document.add(p2);
            document.newPage();
            writerA.resume();
            // only for documentA.pdf
View Full Code Here

            document.add(p2);
            document.add(p2);
            document.newPage();
            document.add(p2);
            document.add(p2);
            document.newPage();
            writerA.resume();
            // only for documentA.pdf
            writerB.pause();
            document.add(p3a);
            writerB.resume();
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

         document.add(new Paragraph("Other relevant data:", font9));
         document.add(new Paragraph("Signature:", font9));
         document.add(new Paragraph("Name of the operator in charge:", font9));


         document.newPage();

         // step 4

         Paragraph pghTitleB = new Paragraph("Record of measured values and test results for dynamic probing", font15);
         pghTitleB.setAlignment(LwgElement.ALIGN_CENTER);
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.