Negative Leading

In negative leading you will learn how we can overlap a text using negative and positive leading values in Phrase constructor. You can make shadow of any text. For this you have just change the values of the leading in Phrase constructor and the text.

Negative Leading

In negative leading you will learn how we can overlap a text using negative and positive leading values in Phrase constructor. You can make shadow of any text. For this you have just change the values of the leading in Phrase constructor and the text.

Negative Leading

Negative Leading    

     

In negative leading  you will learn how we can overlap a text using negative and positive leading values in  Phrase constructor. You can make shadow of any text. For this you have just change the values of  the leading in Phrase constructor and the text.

 

The code of the program is given below:

 

 

import java.io.FileOutputStream;
import java.io.IOException;
import com.lowagie.text.Document;
import com.lowagie.text.DocumentException;
import com.lowagie.text.Phrase;
import com.lowagie.text.pdf.PdfWriter;
public class NegativeLeading {
  public static void main(String[] args)throws Exception {
  System.out.println("Negative Leading");
  Document document = new Document();
  PdfWriter.getInstance(document, new FileOutputStream(
  "NegativeLeading.pdf"));
  document.open();
  document.add(new Phrase(16"Rose india provides online 
java interview question and answer.Rose india provides online java"
));
  document.add(new Phrase(-5,"Rose india provides online 
java interview question and answer.Rose india provides online java"
));
 document.close();
  }
}

The output of the program is given below:

Download this example.