import java.io.FileOutputStream;
import java.io.IOException;
import com.lowagie.text.*;
import com.lowagie.text.pdf.BaseFont;
import com.lowagie.text.pdf.PdfContentByte;
import com.lowagie.text.pdf.PdfWriter;
public class HelloWorldAbsolute {
public static void main(String[] args) throws Exception {
Document.compress = false;
Document document = new Document(PageSize.A4);
PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(
"HelloWorldAbsolute.pdf"));
document.open();
PdfContentByte cb = writer.getDirectContent();
BaseFont bf = BaseFont.createFont(BaseFont.HELVETICA, BaseFont.CP1252,
BaseFont.NOT_EMBEDDED);
cb.saveState();
cb.beginText();
cb.moveText(36, 806);
cb.moveText(0, -18);
cb.setFontAndSize(bf, 12);
cb.showText("Hello World");
cb.endText();
cb.restoreState();
document.close();
}
}