Hello, Can someone please help with this. I am using the below code to write my content to a template which has a predefined header and footer.
Document document = new Document(PageSize.LETTER); PdfWriter writer = PdfWriter.getInstance(document, pdfOutputStream); document.open(); PdfContentByte cb = writer.getDirectContent(); for (int i = 1; i <= quoteReader.getNumberOfPages(); i++) { document.newPage(); PdfImportedPage quoteTemplatePage = writer.getImportedPage( quoteTemplateReader, 1); // Add the template page with header and footer cb.addTemplate(quoteTemplatePage, 0, 0); PdfImportedPage quotePage = writer.getImportedPage( quoteReader, i); // Add the dynamic content cb.addTemplate(quotePage, 0, -75); } By giving -75 as Y coordinate, I am able to set the top margin so that content begins after header. What do I have to use to set the bottom margin so that the content is placed in between the header and footer? Right now, the content is coming on the footer which I want to prevent by setting the bottom margin for y. Appreciate any insights. Thanks -- View this message in context: http://itext-general.2136553.n4.nabble.com/How-to-set-bottom-Y-coordinate-for-addTEmplate-tp4658752.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php