import org.apache.pdfbox.pdmodel.*; public class TestPDFBox { public static void main(String s[]) { new TestPDFBox().testme(); } public void testme() { try { System.out.println("----1--"); // Create a new empty document PDDocument document = new PDDocument(); System.out.println("----2--"); // Create a new blank page and add it to the document PDPage blankPage = new PDPage(); System.out.println("----3--"); document.addPage( blankPage ); System.out.println("----4--"); // Save the newly created document document.save("BlankPage.pdf"); System.out.println("----5--"); // finally make sure that the document is properly // closed. document.close(); System.out.println("----6--"); } catch(Throwable e) { e.printStackTrace(); System.out.println("----err" + e); } } }