import java.io.FileOutputStream;
import com.lowagie.text.Chunk;
import com.lowagie.text.Document;
import com.lowagie.text.Paragraph;
import com.lowagie.text.pdf.PdfWriter;
public class MainClass {
public static void main(String[] args) throws Exception {
Document document = new Document();
PdfWriter.getInstance(document, new FileOutputStream("2.pdf"));
document.open();
Paragraph p;
Chunk chunk;
p = new Paragraph();
chunk = new Chunk(" this ");
chunk.setSkew(15f, -30f);
p.add(chunk);
chunk = new Chunk(" is a ");
chunk.setSkew(15f, 15f);
p.add(chunk);
chunk = new Chunk(" test.");
chunk.setSkew(-30f, 15f);
p.add(chunk);
document.add(p);
document.close();
}
}
|