Package com.lowagie.text

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


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

      // step 3: we open the document
      document.open();
      // step 4:
     
      // the 14 standard fonts in PDF: do not use this Font constructor!
      // this is for demonstration purposes only, use FontFactory!
      LwgFont[] fonts = new LwgFont[14];
View Full Code Here


            document.add(new Header(HtmlTags.JAVASCRIPT, javaScriptSection.toString()));
            document.setJavaScript_onLoad  ("load()");
            document.setJavaScript_onUnLoad("unload()");
           
      document.open();
      // step 4: we add some content
      LwgPhrase phrase1 = new LwgPhrase("There are 3 JavaScript functions in the HTML page, load(), unload() and sayHi().\n\n" +
                                   "The first one will be called when the HTML page has been loaded by your browser.\n" +
                                   "The second one will be called when the HTML page is being unloaded,\n" +
                                   "for example when you go to another page.\n");
View Full Code Here

            // we create a writer that listens to the document
            // and directs a PDF-stream to a file
            PdfWriter.getInstance(document, new GfrFileOutputStream("com.lowagie.examples.fonts.TrueType.pdf"));
           
            // step 3: we open the document
            document.open();
           
            // step 4: we add content to the document
            BaseFont bfComic = BaseFont.createFont("c:\\windows\\fonts\\comicbd.ttf", BaseFont.CP1252, BaseFont.NOT_EMBEDDED);
            LwgFont font = new LwgFont(bfComic, 12);
            String text1 = "This is the quite popular True Type font 'Comic'.";
View Full Code Here

                            com.lowagie.text.rtf.headerfooter.RtfHeaderFooter.DISPLAY_RIGHT_PAGES);

            doc.setHeader(header);
            doc.setFooter(footer);

            doc.open();

            Paragraph p = new Paragraph();
            p.add(new RtfTableOfContents("UPDATE ME!"));
            doc.add(p);
View Full Code Here

          // step 1
            LwgDocument document = new LwgDocument(LwgPageSize.A4, 50, 50, 50, 50);
            // step 2
            PdfWriter.getInstance(document, new GfrFileOutputStream("com.lowagie.examples.fonts.EncodingFont.pdf"));
            // step 3
            document.open();
            // step 4
            String all[] = {"Symbol", "ZapfDingbats"};
            LwgFont hex = new LwgFont(LwgFont.HELVETICA, 5);
            for (int z = 0; z < all.length; ++z) {
                String file = all[z];
View Full Code Here

            document.addKeywords("Metadata, iText, step 3, tutorial");
            // custom (HTML) meta information
            document.addHeader("Expires", "0");
            // meta information that will be in a comment section in HTML
            document.addCreator("My program using iText");
      document.open();
      // step 4: we add a paragraph to the document
      document.add(new Paragraph("Hello World"));
    } catch (DocumentException de) {
      System.err.println(de.getMessage());
    } catch (IOException ioe) {
View Full Code Here

        LwgDocument document = new LwgDocument(LwgPageSize.A4, 50, 350, 50, 50);
        try {
          // step 2
            PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream("spacewordratio.pdf"));
            // step 3
            document.open();
            // 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);
View Full Code Here

            // we create a writer that listens to the document
            // and directs a PDF-stream to a file
            HtmlWriter.getInstance(document, new FileOutputStream("images.html"));
           
            // step 3: we open the document
            document.open();
           
            // step 4:
            document.add(new Paragraph("A picture of my dog: otsoe.jpg"));
            LwgImage jpg = LwgImage.getInstance(new URL("/examples/com/lowagie/examples/html/otsoe.jpg"));
            document.add(jpg);
View Full Code Here

      // step 2:
      // we create a writer that listens to the document
      PdfWriter.getInstance(document, new FileOutputStream("Paragraphs.pdf"));

      // step 3: we open the document
      document.open();
      // step 4:
      Paragraph p1 = new Paragraph(new Chunk(
          "This is my first paragraph. ",
          FontFactory.getFont(FontFactory.HELVETICA, 10)));
      p1.add("The leading of this paragraph is calculated automagically. ");
View Full Code Here

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

      // step 3: we open the document
      document.open();
      // step 4:
     
      // the 14 standard fonts in PDF
      LwgFont[] fonts = new LwgFont[14];
      fonts[0] = FontFactory.getFont(FontFactory.COURIER, LwgFont.DEFAULTSIZE, LwgFont.NORMAL);
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.