Home Java Itext Negative Leading
Questions:Ask|Latest


 
 

Share on Google+Share on Google+

Negative Leading

Advertisement
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.

 

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.

 

Advertisement

Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: March 13, 2008

Ask Questions?    Discuss: Negative Leading  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments
DMCA.com