Adding Chunk to a Phrase : Phrase « PDF RTF « Java

Adding Chunk to a Phrase

Adding Chunk to a Phrase

import com.lowagie.text.Chunk;
import com.lowagie.text.Document;
import com.lowagie.text.Phrase;
import com.lowagie.text.pdf.PdfWriter;

public class PhraseInaChunkPDF {
  public static void main(String[] args) {
    Document document = new Document();
    try {
      PdfWriter.getInstance(document, new FileOutputStream("PhraseInaChunkPDF.pdf"));;

      Phrase phrase = new Phrase(new Chunk("this is a phrase in a chunk\n"));
    } catch (Exception ioe) {
       1,748 k)

Related examples in the same category

1.Phrase with Color red and Normal FontPhrase with Color red and Normal Font
2.Phrase with Leading LinePhrase with Leading Line
3.Phrase with Several Chunks and Different Fonts