Thanks. I did exactly as suggested (extending the VerticalPositionMark). Worked brilliantly.
________________________________ From: 1T3XT info <[email protected]> To: Post all your questions about iText here <[email protected]> Sent: Tuesday, May 4, 2010 2:39:33 PM Subject: Re: [iText-questions] Tab chunk and justified alignment Mark Christian D. Nazareno wrote: > I am trying to achieve a multi-line paragraph that starts with a > paragraph number and a tab. You should use the first line indent, and add the paragraph number using a VerticalPositionMark. > I want the paragraph to be justified but i > think the tab is messing up the character spacing. (Please see attached pdf) Yes, because tabs and justified alignment don't mix. > I think this is the opposite of the bug submitted here: What you're experiencing is the result of a "fix" that doesn't solve the original problem, but makes it less worse. Instead of "jumping out of the text (and possible the page)", the text is not justified. > - Tabs and justified alignment don't mix. Not really a bug fix, but at > least the line doesn't jump out of the text column anymore. Exactly! > Thank you very much to whoever would advise me on this query ^_~ Your use case can't be done with a tab. You should write a subclass, e.g. "ParagraphNumber extends VerticalPositionMark" and implement the draw method so that it adds a page number. Add an instance of this ParagraphNumber as the first element of the paragraph. (Go to http://affiliate.manning.com/idevaffiliate.php?id=223_212 and download the free chapter. Look at listing 2.17 and 2.18 for inspiration.) -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info ------------------------------------------------------------------------------ _______________________________________________ iText-questions mailing list [email protected] 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/
------------------------------------------------------------------------------
_______________________________________________ iText-questions mailing list [email protected] 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/
