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 NewPageToStartANewPagePDF {
public static void main(String[] args) {
Document document = new Document();
try {
PdfWriter.getInstance(document, new FileOutputStream("NewPageToStartANewPagePDF.pdf"));
document.open();
document.add(new Paragraph("A"));
document.newPage();
document.add(new Paragraph("B"));
document.newPage();
document.newPage();
document.newPage();
document.add(new Paragraph("C"));
} catch (Exception ioe) {
System.err.println(ioe.getMessage());
}
document.close();
}
}
itext.zip( 1,748 k)