Package com.lowagie.text

Examples of com.lowagie.text.LwgFont


     *
     * @param styleName The name of this RtfParagraphStyle.
     * @param basedOnName The name of the RtfParagraphStyle this RtfParagraphStyle is based on.
     */
    public RtfParagraphStyle(String styleName, String basedOnName) {
        super(null, new LwgFont());
        this.styleName = styleName;
        this.basedOnName = basedOnName;
    }
View Full Code Here


     * before the user updates the table of contents
     *
     * @param defaultText The default text to display
     */
    public RtfTableOfContents(String defaultText) {
        super(null, new LwgFont());
        this.defaultText = defaultText;
    }
View Full Code Here

     * Constructs a RtfTOCEntry with a certain entry text.
     *
     * @param entry The entry text to display
     */
    public RtfTOCEntry(String entry) {
        super(null, new LwgFont());
        if(entry != null) {
            this.entry = entry;
        }
    }
View Full Code Here

   
  public RtfListLevel(RtfDocument doc)
  {
    super(doc);
    templateID = document.getRandomInt();
        setFontNumber( new RtfFont(document, new LwgFont(LwgFont.TIMES_ROMAN, 10, LwgFont.NORMAL, new Color(0, 0, 0))));
        setBulletFont(new LwgFont(LwgFont.SYMBOL, 10, LwgFont.NORMAL, new Color(0, 0, 0)));
  }
View Full Code Here

  public RtfListLevel(RtfDocument doc, RtfList parent)
  {
    super(doc);
    this.parent = parent;
    templateID = document.getRandomInt();
    setFontNumber( new RtfFont(document, new LwgFont(LwgFont.TIMES_ROMAN, 10, LwgFont.NORMAL, new Color(0, 0, 0))));
        setBulletFont(new LwgFont(LwgFont.SYMBOL, 10, LwgFont.NORMAL, new Color(0, 0, 0)));
  }
View Full Code Here

      // 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];
      fonts[0] = new LwgFont(LwgFont.COURIER, LwgFont.DEFAULTSIZE, LwgFont.NORMAL);
      fonts[1] = new LwgFont(LwgFont.COURIER, LwgFont.DEFAULTSIZE, LwgFont.ITALIC);
      fonts[2] = new LwgFont(LwgFont.COURIER, LwgFont.DEFAULTSIZE, LwgFont.BOLD);
      fonts[3] = new LwgFont(LwgFont.COURIER, LwgFont.DEFAULTSIZE, LwgFont.BOLD | LwgFont.ITALIC);
      fonts[4] = new LwgFont(LwgFont.HELVETICA, LwgFont.DEFAULTSIZE, LwgFont.NORMAL);
      fonts[5] = new LwgFont(LwgFont.HELVETICA, LwgFont.DEFAULTSIZE, LwgFont.ITALIC);
      fonts[6] = new LwgFont(LwgFont.HELVETICA, LwgFont.DEFAULTSIZE, LwgFont.BOLD);
      fonts[7] = new LwgFont(LwgFont.HELVETICA, LwgFont.DEFAULTSIZE, LwgFont.BOLDITALIC);
      fonts[8] = new LwgFont(LwgFont.TIMES_ROMAN, LwgFont.DEFAULTSIZE, LwgFont.NORMAL);
      fonts[9] = new LwgFont(LwgFont.TIMES_ROMAN, LwgFont.DEFAULTSIZE, LwgFont.ITALIC);
      fonts[10] = new LwgFont(LwgFont.TIMES_ROMAN, LwgFont.DEFAULTSIZE, LwgFont.BOLD);
      fonts[11] = new LwgFont(LwgFont.TIMES_ROMAN, LwgFont.DEFAULTSIZE, LwgFont.BOLDITALIC);
      fonts[12] = new LwgFont(LwgFont.SYMBOL);
      fonts[13] = new LwgFont(LwgFont.ZAPFDINGBATS);
      // add the content
      for (int i = 0; i < 14; i++) {
        document.add(new Paragraph("quick brown fox jumps over the lazy dog", fonts[i]));
      }
    } catch (DocumentException de) {
View Full Code Here

            // 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'.";
            document.add(new Paragraph(text1, font));
        }
        catch(DocumentException de) {
            System.err.println(de.getMessage());
View Full Code Here

            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];
                document.add(new Paragraph("Unicode equivalence for the font \""
                    + file
            +"\" with the encoding \""
            +file
            + "\"\n"));
                char tb[];
                if (z == 0)
                    tb = SYMBOL_TABLE;
                else
                    tb = DINGBATS_TABLE;
                BaseFont bf;
                bf = BaseFont.createFont(file, file, true);
                LwgFont f = new LwgFont(bf, 12);
                LwgPdfPTable table = new LwgPdfPTable(16);
                table.setWidthPercentage(100);
                table.getDefaultCell().setBorderWidth(1);
                table.getDefaultCell().setHorizontalAlignment(LwgElement.ALIGN_CENTER);
                for (int k = 0; k < tb.length; ++k) {
View Full Code Here

            // step 3: we open the document
            document.open();
           
            // step 4: we add content to the document
            BaseFont helvetica = BaseFont.createFont(BaseFont.HELVETICA, BaseFont.CP1252, BaseFont.EMBEDDED);
            LwgFont font = new LwgFont(helvetica, 12, LwgFont.NORMAL);
            Chunk chunk = new Chunk("Sponsor this example and send me 1\u20ac. These are some special characters: \u0152\u0153\u0160\u0161\u0178\u017D\u0192\u02DC\u2020\u2021\u2030", font);
            document.add(chunk);
        }
        catch(DocumentException de) {
            System.err.println(de.getMessage());
View Full Code Here

           
            // step 4:
           
            // we create some content
            BaseFont bf = BaseFont.createFont(BaseFont.COURIER, BaseFont.CP1252, BaseFont.NOT_EMBEDDED);
            LwgFont font = new LwgFont(bf, 11, LwgFont.NORMAL);
           
            LwgPhrase unicodes = new LwgPhrase(15, "UNI\n", font);
            LwgPhrase characters = new LwgPhrase(15, "\n", font);
            LwgPhrase names = new LwgPhrase(15, "NAME\n", font);
           
View Full Code Here

TOP

Related Classes of com.lowagie.text.LwgFont

Copyright © 2018 www.massapicom. 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.