I checked it again. Apparently, the margin I set is different, if different font sizes are used. The -2 works perfectly if the field has a font size of 12 (set in Adobe Designer, not in iText). Other fields have a font size of 9, in this cases, correcting the margins by -2 moves the text up too high.
If I understood it correctly, the extra margin is set on all fields at once so there's no way of looking at the font size of each field and setting the extra margin accordingly. Any other ideas? pgruetter wrote: > > Hi all > > We created several PDF forms with Adobe LiveCycle Designer 8.2 ES. We load > these PDF files as templates in iText and fill out the fields and create > the static form with stamper.setFormFlattening(true); > > Problem: > In the PDF template, the labels and the text fields are perfectly aligned > if filled out manually. > After iText fills out the PDF form, the text fields are not aligned > anymore, the text is vertically lower. > If we disable FormFlattening, you can edit the resulting PDF and can see, > that the fields are actually lower than in the original PDF. > > Does anybody have an idea why that is? > Is this a know problem? Are there any solutions? > > Thanks a lot > Patrick > -- View this message in context: http://old.nabble.com/Adobe-PDF-forms---Alignment-broken-when-filled-out-with-iText-tp28012683p28024738.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/