package com;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.sql.SQLException;
import com.itextpdf.text.Document;
import com.itextpdf.text.DocumentException;
import com.itextpdf.text.Paragraph;
import com.itextpdf.text.Rectangle;
import com.itextpdf.text.pdf.PdfWriter;
public class pdf {
public void createPdf()
throws IOException, DocumentException, SQLException {
File file=new File("vipul.pdf");
Document document = new Document();
PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(file));
HeaderFooter event = new HeaderFooter();
writer.setBoxSize("art", new Rectangle(36, 54, 559, 788));
writer.setPageEvent(event);
document.open();
Paragraph p=new Paragraph();
for (int i=0; i<=1000; i++){
p.add("dnfkjnsdjkfjknsdkjfnknsdkfjbsdkjfs");}
document.add(p);
document.close();
}
public static void main(String[] args)
throws IOException, DocumentException, SQLException {
new pdf().createPdf();
}
}