1   package org.intix.itext.test;
2   
3   import java.io.*;
4   
5   import com.lowagie.text.*;
6   import com.lowagie.text.pdf.*;
7   
8   class Descent {
9   	static String para = "Lightning flashed across the sky. Thunder rumbled in the distance. "
10  			+ "The wind began to moan, as if in pain. The good people of the village "
11  			+ "huddled together in the common room. Fear glistened in their eyes and "
12  			+ "their hearts pounded with terror. Evil was descending into their "
13  			+ "valley, and there was nothing they could do to save their lives ...";
14  
15  	public static void main(String[] args) throws Exception {
16  		Document doc = new Document();
17  		PdfWriter.getInstance(doc, new FileOutputStream("./test/descent.pdf"));
18  		doc.open();
19  
20  		Paragraph p = new Paragraph(para);
21  		p.setAlignment(Element.ALIGN_JUSTIFIED);
22  		doc.add(p);
23  
24  		doc.close();
25  	}
26  }