Alexis Pigeon wrote: > Hi surftango, > > 2009/6/3 surftango <surfta...@gmail.com>: >> Both Itext and Flex have text wrapping mechanism exposed via APIs. But they >> both behave differently! meaning flex might display a text wrapped in 4 >> lines while Itext might do the wrapping in 3 for the same area (width x >> height) Flex does a lot of padding and aligning behind the scene while ITex >> api is pretty low level and requires the developer to set each and every >> value (which is a definite advantage). >> >> Pardon me if this is the wrong place to post this issue, as i'm not really >> sure if its an Itext issue or a Flex text wrapping issue. If anybody has >> come across such an issue, will share in more info. > > And? What is the problem? AFAIK, there isn't a line in the PDF > Reference mentionning how a PDF producing software should behave > regarding text wrapping.
I also don't understand why the OP posted that "question". It's as if he would write to Microsoft complaining that a paragraph takes more lines in MSIE than in Firefox, or vice-versa. iText uses font metrics to calculate the space needed by a String. If you address the lower level methods in PdfContentByte, you can take the kerning into account. You can also fine tune word spacing and stuff, so you could mimic what Flex does, but... that's a project on itself. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info ------------------------------------------------------------------------------ OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php 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/