I have the following PDF template which should be consistent for all the pages that gets added in the PDF I am creating ,
The issue is that, am getting this template only for Page 1 and for rest of the pages only blank template is used , Here's the code am using right now,
PdfDocument pdfDoc = new PdfDocument(new PdfReader(SRC),new PdfWriter(baosPDF));
PageSize ps = new PageSize(900, 780);
// Initialize document
Document document = new Document(pdfDoc, ps);
document.setMargins(80f, 20f, 50f, 20f);
PdfFont font = PdfFontFactory.createFont(StandardFonts.HELVETICA);
PdfFont bold = PdfFontFactory.createFont(StandardFonts.HELVETICA_BOLD);
for(int i = 0; i < 10; i++){
document.add(new Paragraph("Some Content"));
document.add(new AreaBreak(AreaBreakType.NEXT_PAGE));
}
document.close();
I have referred this itextsharp add 1 page template to all pages example already , but I need something specific to Itext 7 since it varies a lot from 5.x.x versions
how do I get my PDF to have the single template as shown in image to be common for all the pages ?
