Package com.lowagie.text

Examples of com.lowagie.text.LwgPhrase


              ck.setAnchor(href);
            }
          }
        }
        Paragraph tmp = (Paragraph) stack.pop();
        LwgPhrase tmp2 = new LwgPhrase();
        tmp2.add(currentParagraph);
        tmp.add(tmp2);
        currentParagraph = tmp;
        cprops.removeChain("a");
        return;
      }
View Full Code Here


                }
                return;
            }
            case LwgElement.PHRASE:
            {
                LwgPhrase phrase = (LwgPhrase) element;
                styleAttributes = new Properties();
                if (phrase.hasLeading()) styleAttributes.setProperty(Markup.CSS_KEY_LINEHEIGHT, phrase.getLeading() + "pt");
               
                // start tag
                addTabs(indent);
                writeStart(Markup.HTML_TAG_SPAN);
                writeMarkupAttributes(markup);
                write(phrase.getFont(), styleAttributes);
                os.write(GT);
                currentfont.push(phrase.getFont());
                // contents
                for (Iterator i = phrase.iterator(); i.hasNext(); ) {
                    write((LwgElement) i.next(), indent + 1);
                }
                // end tag
                addTabs(indent);
                writeEnd(Markup.HTML_TAG_SPAN);
View Full Code Here

           String strSubscript,
           LwgFont fnt,
           LwgFont fntSubscript,
           float fltTextRise) throws Exception
   {
      LwgPhrase phr = new LwgPhrase();
      Chunk c;
      c = new Chunk(str, fnt);
      c.setTextRise(0f);
      phr.add(c);
      c = new Chunk(strSubscript, fntSubscript);
      c.setTextRise(fltTextRise);
      phr.add(c);

      return phr;
   }
View Full Code Here

           String str,
           String strSupscript,
           LwgFont fnt,
           LwgFont fntSupscript) throws Exception
   {
      LwgPhrase phr = new LwgPhrase();
      Chunk c;
      c = new Chunk(str, fnt);
      c.setTextRise(0f);
      phr.add(c);
      c = new Chunk(strSupscript, fntSupscript);
      c.setTextRise(3.0f);
      phr.add(c);

      return phr;
   }
View Full Code Here

      return new LwgFont(BaseFont.createFont("Symbol", "Symbol", true), intSize);
   }

   static public LwgPhrase getDELTA(int intSize) throws Exception
   {
      return new LwgPhrase(_STR_DELTA_, getfontGreek(intSize));
   }
View Full Code Here

      return new LwgPhrase(_STR_DELTA_, getfontGreek(intSize));
   }

   static public LwgPhrase getGamma(int intSize) throws Exception
   {
      return new LwgPhrase(_STR_Gamma_, getfontGreek(intSize));
   }
View Full Code Here

     
      super.setWidthPercentage(100);
      super.getDefaultCell().setBorderWidth(0);
      super.getDefaultCell().setPadding(5);
     
      LwgPdfPCell cellLogo = new GfrPdfPCell(new LwgPhrase("Sharpergeo - Elk"));
      cellLogo.setFixedHeight(fltHeight);
     
      super.add(cellLogo);

   }
View Full Code Here

      // step4
      String text = "Quick brown fox jumps over the lazy dog. ";
      for (int i = 0; i < 5; i++) text += text;
      LwgPdfPTable table = new LwgPdfPTable(2);
      LwgPdfPCell largeCell;
      LwgPhrase phrase;
      for (int i = 0; i < 10; i++) {
        phrase = new LwgPhrase(text);
        for (int j = 0; j < i; j++) {
          phrase.add(new LwgPhrase(text));
        }
        if (i == 7) phrase = new LwgPhrase(text);
        table.add(String.valueOf(i));
        largeCell = new LwgPdfPCell(phrase);
        table.add(largeCell);
      }
      document1.add(table);
View Full Code Here

          "NegativeLeading.pdf"));

      // step 3: we open the document
      document.open();
      // step 4:
      document.add(new LwgPhrase(16, "\n\n\n"));
      document
          .add(new LwgPhrase(
              -16,
              "Hello, this is a very long phrase to show you the somewhat odd effect of a negative leading. You can write from bottom to top. This is not fully supported. It's something between a feature and a bug."));
    } catch (DocumentException de) {
      System.err.println(de.getMessage());
    } catch (IOException ioe) {
View Full Code Here

        // TODO Auto-generated catch block
        e.printStackTrace();
      }
        }
        // does it have phrase info?
        LwgPhrase phrase = cell.getPhrase();
        if(phrase != null) {
            try {
        RtfBasicElement[] rtfElements = this.document.getMapper().mapElement(phrase);
        for (int i = 0; i < rtfElements.length; i++) {
          rtfElements[i].setInTable(true);
View Full Code Here

TOP

Related Classes of com.lowagie.text.LwgPhrase

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.