Package com.lowagie.text

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


            document.add(new Paragraph("This PageSize is DIN A6."));
            document.setPageSize(LwgPageSize.A7);
            document.newPage();
            document.add(new Paragraph("This PageSize is DIN A7."));
            document.setPageSize(LwgPageSize.A8);
            document.newPage();
            document.add(new Paragraph("This PageSize is DIN A8."));
            document.setPageSize(LwgPageSize.LETTER);
            document.newPage();
            document.add(new Paragraph("This PageSize is LETTER."));
            document.add(new Paragraph("A lot of other standard PageSizes are available."));
View Full Code Here


            document.add(new Paragraph("This PageSize is DIN A7."));
            document.setPageSize(LwgPageSize.A8);
            document.newPage();
            document.add(new Paragraph("This PageSize is DIN A8."));
            document.setPageSize(LwgPageSize.LETTER);
            document.newPage();
            document.add(new Paragraph("This PageSize is LETTER."));
            document.add(new Paragraph("A lot of other standard PageSizes are available."));
           
        }
        catch(DocumentException de) {
View Full Code Here

      for (int k = 1; k <= 10; ++k) {
        document.add(new Paragraph("This is page " + k));
        document.add(Chunk.NEWLINE);
        document.add(table);
        document.add(p);
        document.newPage();
      }
    } catch (Exception de) {
      de.printStackTrace();
    }
View Full Code Here

            document.open();
           
            // step 4: we add some content
            document.add(new Paragraph("To create a document in landscape format, just make the height smaller than the width. For instance by rotating the PageSize Rectangle: PageSize.A4.rotate()"));
            document.setPageSize(LwgPageSize.A4);
            document.newPage();
            document.add(new Paragraph("This is portrait again"));
           
        }
        catch(DocumentException de) {
            System.err.println(de.getMessage());
View Full Code Here

            PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream("LocalDestination.pdf"));
            // step 3: we open the document
            document.open();
            // step 4: we add some content
            document.add(new Paragraph("Page 1"));
            document.newPage();
            document.add(new Paragraph("This PDF file jumps directly to page 2 when opened"));
            PdfContentByte cb = writer.getDirectContent();
            cb.localDestination("page2", new PdfDestination(PdfDestination.XYZ, -1, 10000, 0));
            writer.setOpenAction("page2");
        }
View Full Code Here

      Chunk chunk = new Chunk("quick brown fox jumps over the lazy dog ");
      for (int i = 0; i < 5; i++) {
        chunk.setTextRenderMode(PdfContentByte.TEXT_RENDER_MODE_STROKE, 0.3f, new Color(i * 30, i * 30, i * 30));
        document.add(chunk);
      }
      document.newPage();
      LwgPhrase p = new LwgPhrase(16f);
      for (int i = 0; i < 5; i++) {
        chunk = new Chunk("quick brown fox jumps over the lazy dog ");
        chunk.setTextRenderMode(PdfContentByte.TEXT_RENDER_MODE_STROKE, 0.3f, new Color(i * 30, i * 30, i * 30));
        p.add(chunk);
 
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

      HyphenationAuto auto = new HyphenationAuto("en", "GB", 2, 2);
      ck.setHyphenation(auto);
      Paragraph p = new Paragraph(ck);
      p.setAlignment(Paragraph.ALIGN_JUSTIFIED);
      document.add(p);
      document.newPage();
      ck = new Chunk(text);
      auto = new HyphenationAuto("en", "US", 2, 2);
      ck.setHyphenation(auto);
      p = new Paragraph(ck);
      p.setAlignment(Paragraph.ALIGN_JUSTIFIED);
View Full Code Here

                Chunk chunk = new Chunk("This is font ", fonts[i]);
                Paragraph p = new Paragraph(chunk);
                p.add(new LwgPhrase(new Chunk(f[i], fonts[i]).setGenericTag(f[i])));
                document.add(p);
                if (i % 4 == 3) {
                    document.newPage();
                }
            }
           
            // we add the glossary
            document.newPage();
View Full Code Here

                    document.newPage();
                }
            }
           
            // we add the glossary
            document.newPage();
            for (Iterator i = generic.glossary.keySet().iterator(); i.hasNext(); ) {
                String key = (String) i.next();
                int page = ((Integer) generic.glossary.get(key)).intValue();
                Paragraph g = new Paragraph(key);
                g.add(" : page ");
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.