Java Programing laungage

iText Projects

iText Project 1

adplus-dvertising
Simple PDF Java Program
Previous Home Next

we know that The iText is a very power full Application programming language which is used for the creating the PDF file and manipulating them. Actually the iText is a library of the file in which many class and interface is included. these class and interfaces are provide the help to complete the task of creation of PDF file in easy way.

By help of iText jar file I am going to creating a simple hello java PDF file. For this we are firstly create a file name which is simplehello.

Example

package r4r;
import java.io.FileOutputStream;
import com.lowagie.text.*;
import com.lowagie.text.pdf.*;

public class simplehellotest 
	{
public static void main(String[] args)throws Exception
	{
Document doc=new Document();
PdfWriter.getInstance(doc,new FileOutputStream(
"simplehello.pdf"));
doc.open(); 
doc.add(new Paragraph("Hello java"));
doc.add(new Paragraph("this is the open source"));
doc.close(); 
}
}
Previous Home Next