Dear Team,
I have to added header and footer to pdf document. I have dymanic content to header and footer.
sample codes are:
HeaderFooter footer = new HeaderFooter();
footer.setMargin(new MarginInfo(10, 20, 20, 20));
Paragraphs p = footer.getParagraphs();
TextFragment tf = new TextFragment("Adding header to document");
p.add(tf);
PageCollection pageColl = document.getPages();
for(int i=1;i<=pageColl.size();++i){
Page pg = pageColl.get_Item(i);
pg.setHeader(footer);
}
My query, if the content of header vary, how it will affect page layout(height of page in pdfs).
Will added header overlap existing content of will move pdf content down to add header???
Also, please share code examples to add footer to pdf document.