Op 12/12/2011 16:16, patrice schreef: > The data is store in the fdf as 2.5 but I see a JavaScript in the fields > wich is: > > this.AFNumber_Format(2, 0, 2, 0, "", false) > > I commented the line in my code > > pdfStamp.setFormFlattening(true); > > but the format still isn't there... > > Any ideas? You'll see that, as soon as you change that value, the JavaScript will be executed in Adobe Reader, because Adobe Reader knows what the function AFNumber_Format is about (it's a precanned function; the implementation is shipped with Adobe Reader); iText on the other hand doesn't look at the JavaScript: if the data is stored in the FDF as "2.5", then iText will create an appearance with the content "2.5".
A solution may be to tell iText NOT to create any appearances, but then you won't be able to flatten the PDF. The best solution is to apply the formatting yourself: fetch the "2.5" from the FDF, format it using your own formatting method (because I don't think you have access to AFNumber_Format), and put that formatted String in the form using setField(). ------------------------------------------------------------------------------ Learn Windows Azure Live! Tuesday, Dec 13, 2011 Microsoft is holding a special Learn Windows Azure training event for developers. It will provide a great way to learn Windows Azure and what it provides. You can attend the event by watching it streamed LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure _______________________________________________ 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