pdf create blank via apache pdfbox - Java PDF

Java examples for PDF:pdfbox

Description

pdf create blank via apache pdfbox

Demo Code



import org.apache.pdfbox.pdmodel.*;
import java.io.*;

public class BlankPDF {
    public static void main(String[] args) {
        PDDocument doc = null;//from  w  w w .j  a v a 2  s  .  c o m
        doc = new PDDocument();
        doc.addPage(new PDPage());

        try {
            doc.save("pdfbox/pdf/create/blank/Empty PDF.pdf");
            doc.close();
        } catch (Exception io) {
            System.out.println(io);
        }
    }
}

Related Tutorials