Hi This issue is about the loaded PDF and it's bottom margin. The PDF used as "template" and that is loaded at initialization is created in InDesign and the bottom margin is set to 64 (pt) but still when the writer adds a Paragraph text is written below that 64pt margin, how come. Is there a way to see - during debugging - that the margin actually is 64? Is the margin set in the loaded PDF template not even used. the code that loads the template is this:
document = new Document(); try { writer = PdfWriter.getInstance(document, stream); } catch (DocumentException docEx) { throw new PdfGenerationException(docEx); } writer.setPageEvent(pdfEvtHandler); setDocumentMetaData(applicationType); document.open(); PdfLoader tLoader = new PdfLoader(writer); PdfImportedPage tTemplate = null; if (myCondition) { try { tTemplate = tLoader.readPage(CommonReportConfig.BTP_APPLICATION_NORMAL_TEMPLATE); } catch (Exception ex) { aLogger.error("Exception was caught when trying to read PDF Template: '" + CommonReportConfig.BTP_APPLICATION_NORMAL_TEMPLATE + "'.", ex); throw new PdfGenerationException(ex); } document.setPageSize(tTemplate.getBoundingBox()); writer.getDirectContent().addTemplate(tTemplate, 0, 0); And during debugging I inspect the writer object and finds that writer.getPdfDocument() has a bottom margin of 36, and not 64 as I hoped for. So another question would be, if I set the the margins before loading the template from external file, will those margins be unaffected by the loaded template? /R -- View this message in context: http://itext-general.2136553.n4.nabble.com/Problem-with-margin-tp3037663p3037663.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Centralized Desktop Delivery: Dell and VMware Reference Architecture Simplifying enterprise desktop deployment and management using Dell EqualLogic storage and VMware View: A highly scalable, end-to-end client virtualization framework. Read more! http://p.sf.net/sfu/dell-eql-dev2dev _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions 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